#4253: trouble attacking features (trees, buildings)
-------------------------------------+--------------------------------
        Reporter:  Althalus          |      Owner:
            Type:  bug               |     Status:  new
        Priority:  normal            |  Milestone:  unspecified
       Component:  other             |    Version:  master but not 3.1
Operating System:  All/Non-Specific  |
-------------------------------------+--------------------------------
 On skirmish maps, asking units to destroy a feature (a tree, for instance)
 will cause these units to move somewhere else entirely (and make it almost
 impossible to destroy features).
 Investigation showed that conversion from ini to json in feature.ini/json
 of the skirmish maps puts a wrong value in the 'id' field, which leads to
 the game associating the id '0' to all features, and then whenever a unit
 is ordered to attack a feature, it tries to find its target by id and
 takes the first one that matches.

 In the case of structures (from struct.json), there is a check in the
 loading code which prevents from assigning a 0 id to the loaded structures
 (game.cpp:4797), and it uses instead the id generated by the object
 constructor.

 So this bug could be fixed by either putting the same check in features
 loading (game.cpp:5414), which might or might not be the right thing to
 do, or fixing the conflict on the id field in the conversion scripts
 (ini2json_save.py, if I'm not mistaken) and re-running the conversion.

--
Ticket URL: <http://developer.wz2100.net/ticket/4253>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Warzone2100-project mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-project

Reply via email to