Procedure $6AEA4 (ovr89:0C95)
This procedure is supposed to check, when a unit is lost due to not paying upkeep, if it was a windwalker over sea. If yes, it returns a list, which contains unit IDs that need to also die (because they can't swim). I've confirmed this isn't working in game, losing a Djinn to 0 MP did not hurt the walking units in the stack.
The procedure contains two uninitialized variables, var_2 and var_1E. Based on the code, I assume var_2 should have been the size of the stack, and var_1E the list of units in it. However, both variables are never set in the procedure, so the call to get the units stacked together into the list is completely missing. If this is true, and everything points to that, this checks random memory addresses (outside the range of valid unit IDs, even) and might, in theory, found what "looks like" a unit that needs to drown, in which case returns these IDs for disbanding, which will overwrite memory there.
If anyone who knows assembler code has time, please take a look at that procedure. For the time being, I will remove it entirely as it doesn't work anyway to be on the safe side but it would be nice if someone confirmed my theory.
This procedure is supposed to check, when a unit is lost due to not paying upkeep, if it was a windwalker over sea. If yes, it returns a list, which contains unit IDs that need to also die (because they can't swim). I've confirmed this isn't working in game, losing a Djinn to 0 MP did not hurt the walking units in the stack.
The procedure contains two uninitialized variables, var_2 and var_1E. Based on the code, I assume var_2 should have been the size of the stack, and var_1E the list of units in it. However, both variables are never set in the procedure, so the call to get the units stacked together into the list is completely missing. If this is true, and everything points to that, this checks random memory addresses (outside the range of valid unit IDs, even) and might, in theory, found what "looks like" a unit that needs to drown, in which case returns these IDs for disbanding, which will overwrite memory there.
If anyone who knows assembler code has time, please take a look at that procedure. For the time being, I will remove it entirely as it doesn't work anyway to be on the safe side but it would be nice if someone confirmed my theory.