WhiteTreePaladin Posted July 19, 2010 Report Share Posted July 19, 2010 I've noticed something interesting (It's a problem Michael mentioned earlier.)If there are both advanced and elite units on a map, the elite units will have the same stats as the advanced version. The elite version will have the correct icon though - which is referenced in the elite template.On the Latium map, there are only elite (and basic if you train them) units available. They both have the correct stats there. Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted July 20, 2010 Report Share Posted July 20, 2010 I noticed another bug with under-construction buildings starting with full HP, and it turns out it's the same as this. When an entity template first gets used by a script, the engine caches the result of converting the template to a JS object, and it assumed templates were never modified so it was safe to cache that forever. It's true that templates aren't modified directly, but with inheritance they are copied and then modified (adding the child's data to the parent's) and it was copying and reusing the old cached JS object. So if an entity inherited from another entity which was loaded earlier, it would get the old entity's stats.Fixed locally; I'll commit soonish. Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted July 20, 2010 Author Report Share Posted July 20, 2010 I also noticed some of the Celt buildings weren't inheriting properly - I'll see if your fix corrects that also. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.