Hi all,

Looks like I have a hard time catching the right people online to ask these
questions, so I'll ask here instead. These are all related to urgent issues
I need to solve to fix the remaining critical bugs, and get the whiteboard
fully stable for 1.10.

*Unit map*
*
*

   - I often need to modify a unit's appearance to normal (from ghosted)
   after the execution of a planned move. Problem is, anything can happen to
   the unit during the execution because of leveling up, WML shenanigans, etc.
   I want to replace all my current checks for the unit still being around by
   switching to using unit map iterators instead. *Questions:* If a unit
   map iterator is valid, can I trust that the unit it points to is too? And
   importantly, if I extract a unit from the unit map, is the iterator still
   valid i.e. does it still point to the unit (which could actually be
   dangerous)? If I then put back the unit in the unit map, is the iterator
   valid at that point? Does anything invalidate these blasted iterators, then?


   - The unit constructor has an option to create a fake unit, i.e. one
   that doesn't get random traits or an ordinary underlying ID (the unit
   apparently gets one from a special range) so as not to cause OOS with other
   clients. I create some of those to insert in the unit map to temporarily
   represent future recruited unitsĀ­. Problem is, after inserting and removing
   those the unit map spits out errors about having to do an extensive search
   - the error seems to come out as soon as, after the insertion and removal,
   an iterator is created then destroyed. Presumably the iterator destructor
   does some validation in the unit map. *Question:* Am I doing something
   wrong, or is there an unit map bug? In any case, I really need the ability
   to insert fake units into the unit map to represent recruits. *Steps to
   reproduce: *Start minecraft with full logging, switch to planning mode,
   plan a few recruits and then move your mouse cursor around a bit. Enjoy the
   error messages.

To be continued as I reexamine the other issues I have on hand.

Thanks in advance for your help and apologies if the above is not optimally
readable.

Gabriel aka gabba
_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to