Modify P_CanPickupItem hook to function correctly

Returning true for the first return argument disables being able to pickup stuff, in combontion with weapon and other status checks can be used to turn off picking x item. the second return specifies if you override vanilla pickup behaviour and always pick up stuff
This commit is contained in:
NepDisk 2025-11-18 01:27:20 -05:00
parent 50b6e919fe
commit 5dfb285bd8

View file

@ -116,7 +116,7 @@ boolean P_CanPickupItem(player_t *player, UINT8 weapon)
boolean force = false;
if (LUA_HookCanPickupItem(player, weapon, &force))
return true;
return false;
if (!force)
{