Fixed lag caused by character.damageLimb

This commit is contained in:
EvilFactory
2024-09-06 18:58:08 -03:00
parent 911fff14e9
commit 307c81c3bd
3 changed files with 10 additions and 10 deletions
@@ -65,13 +65,4 @@ function(instance, p)
p.PreventExecution = true
return false
end
end, Hook.HookMethodType.Before)
Hook.Patch("Barotrauma.Character", "DamageLimb", function(instance, p)
local result = Hook.Call("character.damageLimb", instance, p["afflictions"], p["attacker"], p["hitLimb"], p["worldPosition"], p["stun"], p["attackImpulse"], p["damageMultiplier"], p["allowStacking"], p["penetration"], p["shouldImplode"], p["playSound"])
if result == true then
p.PreventExecution = true
return false
end
end, Hook.HookMethodType.Before)
end, Hook.HookMethodType.Before)