Fixed disabling of Interact Key

This commit is contained in:
ZioPao
2024-05-15 13:13:27 +02:00
parent 80c8b22faa
commit 5f64ead354
2 changed files with 10 additions and 9 deletions

View File

@@ -202,17 +202,13 @@ function LocalPlayerController.HandleDamage(character)
LocalPlayerController.hasBeenDamaged = false
end
---Setup HandleDamage, triggered by OnPlayerGetDamage
---Setup HandleDamage, triggered by OnPlayerGetDamage. To prevent a spam caused by this awful event, we use a bool lock
---@param character IsoPlayer|IsoGameCharacter
---@param damageType string
---@param damageAmount number
function LocalPlayerController.OnGetDamage(character, damageType, damageAmount)
-- TODO Check if other players in the online triggers this
if LocalPlayerController.hasBeenDamaged == false then
-- Start checks
-- TODO Add a timer before we can re-enable this bool?
LocalPlayerController.hasBeenDamaged = true
LocalPlayerController.HandleDamage(character)
end