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
true.

'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
anyway.

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:

  <http://gna.org/patch/?1617>

_______________________________________________
  Meddelandet skickades via/av Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to