(stre): Fix to make it match what happens in attack sequence: land
units do not react to a mountain. (stre): Add an empth_yield() per sector to make the server responsive to other players as this command is CPU intensive.
This commit is contained in:
parent
2a12333ecb
commit
6484e52678
1 changed files with 10 additions and 1 deletions
|
@ -86,7 +86,10 @@ stre(void)
|
|||
else
|
||||
pr("%7s", "");
|
||||
|
||||
r_total = att_reacting_units(def, 0, 0, &dummy, 9999999);
|
||||
if (def->sct_type != SCT_MOUNT)
|
||||
r_total = att_reacting_units(def, 0, 0, &dummy, 9999999);
|
||||
else
|
||||
r_total = 0.0;
|
||||
def->own = 0;
|
||||
eff = att_combat_eff(def);
|
||||
if (sect.sct_own == sect.sct_oldown || player->god) {
|
||||
|
@ -105,6 +108,12 @@ stre(void)
|
|||
else
|
||||
pr(" %9s", "");
|
||||
pr("%9d\n", (int)((dtotal + def->mil + r_total) * eff));
|
||||
/*
|
||||
* This command is quite compute intensive. Yield the
|
||||
* processor after every sector, to keep the game responsive
|
||||
* for other players.
|
||||
*/
|
||||
empth_yield();
|
||||
}
|
||||
if (!nsect) {
|
||||
if (player->argp[1])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue