Skip to content

Fix SRB2P_runHook only sending one argument to functions

NerduMiner requested to merge nerdyminer18/srb2p-public:hook-argument-fix into next

I kind of stumbled onto this issue while experimenting with a better solution for Hud Hooking, its implications are big enough though that I made a merge request for it.

Apparently, when you encapsulate an unpack call on a table with more than one element within parenthesis, Lua will, for whatever reason, only return one element instead of all of them. This was causing a number of Hooks that were running with more than one argument to be inoperable. Removing the parenthesis from the unpack call fixes this issue.

Hooks Fixed

  • GetOneMore
  • ModifyDamage
  • FighterDamage

Merge request reports

Loading