(update_main): Change update sequence to repair ships, planes and land
units after sectors produce. This makes repairs use new avail instead of old.
This commit is contained in:
parent
016249c9e5
commit
967299a375
2 changed files with 19 additions and 17 deletions
|
@ -18,20 +18,12 @@ This document gives a rough order of events during the update.
|
||||||
|
|
||||||
2) Then, in order of country #, deal with each country:
|
2) Then, in order of country #, deal with each country:
|
||||||
a) pay for military reserves.
|
a) pay for military reserves.
|
||||||
c) ship maintenance
|
b) ship maintenance
|
||||||
pay maintenance, produce, then feed and plague people on board
|
pay maintenance, produce, then feed and plague people on board
|
||||||
d) ship building
|
c) plane maintenance
|
||||||
ships that are stopped are skipped (see info stop)
|
d) land unit maintenance
|
||||||
ships execute their orders right after building
|
|
||||||
finally, if option SAIL is enabled, follow sail paths
|
|
||||||
e) plane maintenance
|
|
||||||
f) plane building
|
|
||||||
planes that are stopped are skipped (see info stop)
|
|
||||||
g) land unit maintenance
|
|
||||||
pay maintenance, then feed and plague people on board
|
pay maintenance, then feed and plague people on board
|
||||||
h) land unit building
|
e) produce for all sectors
|
||||||
land units that are stopped are skipped (see info stop)
|
|
||||||
i) produce for all sectors
|
|
||||||
a) if the sector is a cap, it costs $1 per etu since
|
a) if the sector is a cap, it costs $1 per etu since
|
||||||
the last update
|
the last update
|
||||||
b) people in non-sanctuary sectors eat
|
b) people in non-sanctuary sectors eat
|
||||||
|
@ -50,6 +42,14 @@ This document gives a rough order of events during the update.
|
||||||
e) sectors that are stopped are skipped (see info stop)
|
e) sectors that are stopped are skipped (see info stop)
|
||||||
f) first increase eff
|
f) first increase eff
|
||||||
g) then make things
|
g) then make things
|
||||||
|
f) ship building
|
||||||
|
ships that are stopped are skipped (see info stop)
|
||||||
|
ships execute their orders right after building
|
||||||
|
finally, if option SAIL is enabled, follow sail paths
|
||||||
|
g) plane building
|
||||||
|
planes that are stopped are skipped (see info stop)
|
||||||
|
h) land unit building
|
||||||
|
land units that are stopped are skipped (see info stop)
|
||||||
|
|
||||||
3) Then, do deliveries for all sectors in the world, row by row, going from
|
3) Then, do deliveries for all sectors in the world, row by row, going from
|
||||||
top to bottom, left to right
|
top to bottom, left to right
|
||||||
|
|
|
@ -125,17 +125,19 @@ update_main(void *unused)
|
||||||
}
|
}
|
||||||
np->nat_money += (int)(np->nat_reserve * money_res * etu);
|
np->nat_money += (int)(np->nat_reserve * money_res * etu);
|
||||||
|
|
||||||
/* 0 is maintain, 1 is build */
|
/* maintain units */
|
||||||
prod_ship(etu, x, bp, 0);
|
prod_ship(etu, x, bp, 0);
|
||||||
prod_ship(etu, x, bp, 1);
|
|
||||||
prod_plane(etu, x, bp, 0);
|
prod_plane(etu, x, bp, 0);
|
||||||
prod_plane(etu, x, bp, 1);
|
|
||||||
prod_land(etu, x, bp, 0);
|
prod_land(etu, x, bp, 0);
|
||||||
prod_land(etu, x, bp, 1);
|
|
||||||
|
|
||||||
/* produce all sects that haven't produced yet */
|
/* produce all sects */
|
||||||
produce_sect(x, etu, bp, p_sect);
|
produce_sect(x, etu, bp, p_sect);
|
||||||
np->nat_money -= p_sect[SCT_CAPIT][1];
|
np->nat_money -= p_sect[SCT_CAPIT][1];
|
||||||
|
|
||||||
|
/* build units */
|
||||||
|
prod_ship(etu, x, bp, 1);
|
||||||
|
prod_plane(etu, x, bp, 1);
|
||||||
|
prod_land(etu, x, bp, 1);
|
||||||
}
|
}
|
||||||
logerror("done producing for countries.");
|
logerror("done producing for countries.");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue