]> git.pond.sub.org Git - empserver/commit
update: Use a scratch sctstr for unit repair simulation
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 5 Jun 2016 14:03:39 +0000 (16:03 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 17:59:58 +0000 (19:59 +0200)
commit199b1498c8ba2ac2d32f2091a5d37685ec136d5d
tree1a8f0a67f77121b788d4b4d29549d042f5f71cd3
parent66edd2bacaf5079473f0724adbdb301a265b3cd2
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>
include/budg.h
include/prototypes.h
src/lib/update/bp.c
src/lib/update/land.c
src/lib/update/material.c
src/lib/update/plane.c
src/lib/update/ship.c