forked from github/server
rules.give.max_men == -1 für unlimitierte Übergaben in E2
This commit is contained in:
parent
38fe2b1144
commit
ce94c9805d
2 changed files with 4 additions and 3 deletions
|
@ -94,7 +94,7 @@
|
|||
<param name="hunger.long" value="1"/>
|
||||
<param name="init_spells" value="0"/>
|
||||
<param name="rules.reserve.twophase" value="1"/>
|
||||
<param name="rules.give.max_men" value="10000"/>
|
||||
<param name="rules.give.max_men" value="-1"/>
|
||||
<param name="rules.check_overload" value="0"/>
|
||||
<param name="rules.limit.faction" value="2500"/>
|
||||
<param name="rules.maxskills.magic" value="5"/>
|
||||
|
|
|
@ -244,6 +244,7 @@ message * give_men(int n, unit * u, unit * u2, struct order *ord)
|
|||
int k = 0;
|
||||
int error = 0;
|
||||
message * msg;
|
||||
int maxt = max_transfers();
|
||||
|
||||
assert(u2);
|
||||
|
||||
|
@ -303,7 +304,7 @@ message * give_men(int n, unit * u, unit * u2, struct order *ord)
|
|||
error = 96;
|
||||
}
|
||||
else if (u->faction != u2->faction) {
|
||||
if (u2->faction->newbies + n > max_transfers()) {
|
||||
if (maxt>=0 && u2->faction->newbies + n > maxt) {
|
||||
error = 129;
|
||||
}
|
||||
else if (u_race(u) != u2->faction->race) {
|
||||
|
@ -365,7 +366,7 @@ message * give_men(int n, unit * u, unit * u2, struct order *ord)
|
|||
set_leftship(u2, sh);
|
||||
}
|
||||
transfermen(u, u2, n);
|
||||
if (u->faction != u2->faction) {
|
||||
if (maxt>=0 && u->faction != u2->faction) {
|
||||
u2->faction->newbies += n;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue