Skip to content
Snippets Groups Projects
Forked from STJr / SRB2
Source project has a limited visibility.
  • Monster Iestyn's avatar
    52410300
    Fix ShouldDamage, MobjDamage and MobjDeath hooks all messing up the pushing of... · 52410300
    Monster Iestyn authored
    Fix ShouldDamage, MobjDamage and MobjDeath hooks all messing up the pushing of variables to Lua as function args, by adding damagetype support where it was missing!
    
    The above issue occured only if you had both a generic hook and a type specific hook for a particular hook type. This way, the stack is never updated to include damagetype at the start, and all pushes of the variables get offsetted by 1 compared to what they should be, once the code *expects* damagetype to be included in it.
    52410300
    History
    Fix ShouldDamage, MobjDamage and MobjDeath hooks all messing up the pushing of...
    Monster Iestyn authored
    Fix ShouldDamage, MobjDamage and MobjDeath hooks all messing up the pushing of variables to Lua as function args, by adding damagetype support where it was missing!
    
    The above issue occured only if you had both a generic hook and a type specific hook for a particular hook type. This way, the stack is never updated to include damagetype at the start, and all pushes of the variables get offsetted by 1 compared to what they should be, once the code *expects* damagetype to be included in it.