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) function LocalPlayerController.HandleDamage(character)
--TOC_DEBUG.print("Player got hit!") --TOC_DEBUG.print("Player got hit!")
-- TOC_DEBUG.print(damageType) -- 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 bd = character:getBodyDamage()
local dcInst = DataController.GetInstance() local dcInst = DataController.GetInstance()
local modDataNeedsUpdate = false local modDataNeedsUpdate = false

View File

@@ -6,7 +6,7 @@ require("TOC/Events")
---@class Main ---@class Main
local Main = { local Main = {
_version = "2.0.10" _version = "2.0.11"
} }
function Main.Start() function Main.Start()

View File

@@ -4,5 +4,5 @@ description=You've been bitten. You have only two choices.
id=TheOnlyCure id=TheOnlyCure
icon=icon.png icon=icon.png
url=https://github.com/ZioPao/The-Only-Cure url=https://github.com/ZioPao/The-Only-Cure
modversion=2.0.10 modversion=2.0.11
pzversion=41.65 pzversion=41.65