Fixed error in UpdateAmputations during init in MP

This commit is contained in:
ZioPao
2024-01-12 14:03:22 +01:00
parent 15b1d070bf
commit b9ed37f3ba
2 changed files with 13 additions and 4 deletions

View File

@@ -216,7 +216,11 @@ Events.OnPlayerGetDamage.Add(LocalPlayerController.OnGetDamage)
---Updates the cicatrization process, run when a limb has been cut. Run it every 1 hour
function LocalPlayerController.UpdateAmputations()
local dcInst = DataController.GetInstance()
if dcInst:getIsAnyLimbCut() == false then
if not dcInst:getIsDataReady() then
TOC_DEBUG.print("Data not ready for UpdateAmputations, waiting next loop")
return
end
if not dcInst:getIsAnyLimbCut() then
Events.EveryHours.Remove(LocalPlayerController.UpdateAmputations)
end