Menu

#46 No Armor Fix Fix

closed-rejected
nobody
None
2013-01-26
2013-01-20
Vanoi
No

This is just a bug for the No Armor Fix.

Basicly, this is a fix for Necro AI'd units who turn out with 1 Armor Max. What's happening is that when a unit dies, it doesn't actually change owners so if the original owner redeploys all his dead units (Armor<0) would get set to 1 Armor Max. So then an Necro comes along and AIs it making it a slave with 1 Max Armor.

Git: http://sourceforge.net/u/vanoi/dropshock/ci/02df0346e0d3ca7b4f56a21c0c02e3dbace81b41/

Discussion

  • Vanoi

    Vanoi - 2013-01-21
    • status: open --> council-approved
     
  • Frizzled

    Frizzled - 2013-01-26

    Bad fix:

    i_armor_max tracks the maximum armor a unit has to ensure that any healing does not exceed the max armor the unit should have. If this is a fix for destroyed units then the code should look like this:

    UPDATE deployed_units SET i_armor = 1, i_armor_max = 1 WHERE i_armor <= 0 AND is_destroyed='N' AND i_owner=?

    I've committed the fix.

     

    Last edit: Frizzled 2013-01-26
  • Frizzled

    Frizzled - 2013-01-26
    • status: council-approved --> closed-rejected
     

Log in to post a comment.