Death of an advanced unit
Lincoln Peters
peters2000@mindspring.com
Tue Jun 18 14:27:00 GMT 2002
As I think about it, it gets even stranger. I was looking at "Space
Civilization" (no mobile advanced units), and got the segfault when an
advanced units was destroyed by hp-to-garrison (When a Level 0
civilization builds a Level 1 civ, the Level 0 civ vanishes). However,
I don't see any segfaults if a city is destroyed in "Colonizer". I
guess I don't know what's going on.
As far as moving advanced units go, I gave up on them and re-wrote
floating cities to be non-advanced but have their production affected by
terrain using the "productivity" table. No segfaults either way.
On Tue, 2002-06-18 at 13:39, Hans Ronne wrote:
> This is weird. I checked to code, and terrain usage is always cleaned up
> for advanced units irrespective of how they die. The same code is used in
> all cases including starvation (kill_unit_aux). So this can't be the reason
> for your crashes. Was this in the game where advanced units also were
> mobile? As I mentioned earlier, the unit move code cannot yet handle
> terrain usage, so if the unit first moves and then dies, we may end up with
> NULL pointers being dereferenced.
>
> The key question is therefore if you see this only with moving advanced units.
More information about the Xconq7
mailing list