lock for HandleDamage not disengaging in some cases

This commit is contained in:
ZioPao
2024-05-15 11:52:45 +02:00
parent 696edc1f1d
commit 80c8b22faa
3 changed files with 7 additions and 3 deletions

View File

@@ -149,7 +149,11 @@ LocalPlayerController.hasBeenDamaged = false
function LocalPlayerController.HandleDamage(character)
--TOC_DEBUG.print("Player got hit!")
-- TOC_DEBUG.print(damageType)
if character ~= getPlayer() then return end
if character ~= getPlayer() then
-- Disable lock before doing anything else
LocalPlayerController.hasBeenDamaged = false
return
end
local bd = character:getBodyDamage()
local dcInst = DataController.GetInstance()
local modDataNeedsUpdate = false