diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index bf38b501a..ed9d71986 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -229,6 +229,7 @@ select_recruitment(request ** rop, int (*quantify)(const struct race*, int), int static void add_recruits(unit * u, int number, int wanted) { + assert(number<=wanted); if (number > 0) { unit * unew; int i = fspecial(u->faction, FS_MILITIA); @@ -348,7 +349,7 @@ do_recruiting(recruitment * recruits, int available) if (rc==new_race[RC_URUK]) multi = 1; - number = min(req->qty * 2, get) / multi; + number = min(req->qty, get / multi); if (rc->recruitcost) { int afford = get_pooled(u, u->region, R_SILVER) / rc->recruitcost; number = min(number, afford); @@ -381,32 +382,32 @@ expandrecruit(region * r, request * recruitorders) { recruitment * recruits = NULL; - int total = 0; + int orc_total = 0; /* centaurs: */ - recruits = select_recruitment(&recruitorders, horse_recruiters, &total); + recruits = select_recruitment(&recruitorders, horse_recruiters, &orc_total); if (recruits) { int recruited, horses = rhorses(r) * 2; - if (total