update: Use a scratch sctstr for unit repair simulation
If player->simulation, shiprepair(), planerepair(), landrepair() must use the bp map, and must not change game state. Copy the sector to a scratch buffer, update it from the bp map, work on the sector normally, then write back to the bp map. This is simpler and safer. Since get_materials() loses its connection to the bp map, move its declaration out of budg.h. While there, drop an ancient debugging logerror() from landrepair(). Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
66edd2baca
commit
199b1498c8
7 changed files with 56 additions and 52 deletions
|
@ -672,7 +672,7 @@ extern int prod_land(int, int, struct bp *, int);
|
|||
/* main.c */
|
||||
/* in server.h */
|
||||
/* material.c */
|
||||
/* in budg.h */
|
||||
extern int get_materials(struct sctstr *, short[], int);
|
||||
/* mobility.c */
|
||||
extern void mob_sect(void);
|
||||
extern void mob_ship(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue