mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 16:52:21 +00:00

This is consistent with the introduction of the UnitPtr class. fake_units really aren't different from units, the only difference is their life time / allocation and ownership. Since we are trying to use reference counting for all units (to make them safe to use with animations), the fake units need to be managed by a reference counted pointer also. This is the easiest way to achieve that. I also remove some odd code the [move_units_fake] handler -- there was explicit code to remove the fake units from the fake unit manager, but this is redundant as it is the responsibility of the destructor. Code Blocks and VC project files are updated, but Code::Blocks Scons and Xcode are not.