From c1faeeaabf538b8a197a6afd72b9df9efb1e0349 Mon Sep 17 00:00:00 2001 From: ZioPao Date: Tue, 7 May 2024 16:58:55 +0200 Subject: [PATCH] Potential fix to bleeding issue --- .../client/TOC/Controllers/LocalPlayerController.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/media/lua/client/TOC/Controllers/LocalPlayerController.lua b/media/lua/client/TOC/Controllers/LocalPlayerController.lua index 73fc2a0..fb1a4ed 100644 --- a/media/lua/client/TOC/Controllers/LocalPlayerController.lua +++ b/media/lua/client/TOC/Controllers/LocalPlayerController.lua @@ -127,8 +127,15 @@ function LocalPlayerController.TryRandomBleed(character, limbName) if chance > normCicTime then TOC_DEBUG.print("Triggered bleeding from non cicatrized wound") local adjacentBodyPartType = BodyPartType[StaticData.LIMBS_ADJACENT_IND_STR[limbName]] - character:getBodyDamage():getBodyPart(adjacentBodyPartType):setBleeding(true) - character:getBodyDamage():getBodyPart(adjacentBodyPartType):setBleedingTime(20) + + -- we need to check if the wound is already bleeding before doing anything else to prevent issues with bandages + local bp = character:getBodyDamage():getBodyPart(adjacentBodyPartType) + bp:setBleedingTime(20) -- TODO Should depend on cicatrization instead of a fixed time + + + + + --character:getBodyDamage():getBodyPart(adjacentBodyPartType):setBleeding(true) end end