Follow-up Comment #4, patch #1617 (project freeciv):

Updating the patch. This makes the mechanism much better. 

New summary:

We change the type of the userdata to a marker class called
'Nonexistent' [when a freeciv object such as city or unit is free'd].
Nonexistent has one single method :exists() that always returns false. City
and Unit correspondingly have :exists() methods which should always return

'Nonexistent' class is common for everything that is removed. I don't think
the extra complexity is needed to have separate Dead_Unit, Razed_City etc
types. In the end, there is no sensible methods you can call on a dead unit

Players are also removed.

(file #8939)

Additional Item Attachment:

File name: 2010041201-Remove-script-objects-for-removed-units-cities.patch
Size:9 KB


Reply to this item at:


  Meddelandet skickades via/av Gna!

Freeciv-dev mailing list

Reply via email to