Merge pull request #179 from badgerman/develop

Unlimitierte Personen-Übergabe in E2
This commit is contained in:
Enno Rehling 2015-05-03 11:15:08 +02:00
commit b603001760
2 changed files with 4 additions and 3 deletions

View File

@ -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"/>

View File

@ -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;
}
}