diff --git a/media/lua/client/TOC_GlobalFunctions.lua b/media/lua/client/TOC_GlobalFunctions.lua index a345312..bff0e4e 100644 --- a/media/lua/client/TOC_GlobalFunctions.lua +++ b/media/lua/client/TOC_GlobalFunctions.lua @@ -203,12 +203,12 @@ function OperateArm(partName, surgeonFact, useOven) end end - FixDeepWound(partName) + FixDeepWound(player, partName, useOven) player:transmitModData(); end -function FixDeepWound(partName) +function FixDeepWound(player, partName, useOven) local a_rightArm = {"RightArm", "RightForearm", "RightHand"} local a_rightForearm = {"RightForearm", "RightHand"} @@ -240,11 +240,17 @@ function FixDeepWound(partName) for k,v in pairs(chosen_array) do - local tmpBodyPart = bodyDamage:getBodyPart(TOC_getBodyPart(v)); + local tmpBodyPart = player:getBodyDamage():getBodyPart(TOC_getBodyPart(v)); tmpBodyPart:setDeepWounded(false); -- Basically like stictching tmpBodyPart:setDeepWoundTime(0); - bodyPart:setBleeding(true); - bodyPart:setBleedingTime(10); -- Reset the bleeding + if useOven then + tmpBodyPart:setBleeding(false) + tmpBodyPart:setBleedingTime(0) -- no bleeding since it's been cauterized + else + + tmpBodyPart:setBleeding(true); + tmpBodyPart:setBleedingTime(10); -- Reset the bleeding + end end diff --git a/media/lua/client/TimedActions/NewOnOperate.lua b/media/lua/client/TimedActions/NewOnOperate.lua index 446dd16..524a3d4 100644 --- a/media/lua/client/TimedActions/NewOnOperate.lua +++ b/media/lua/client/TimedActions/NewOnOperate.lua @@ -38,7 +38,7 @@ function ISOperateArm:findArgs() local weight = math.floor(self.kit:getWeight() * 10 + 0.5) if weight == 1 then surgeonFact = surgeonFact + 2; - elseif weight == surgeonFact2 then + elseif weight == surgeonFact then surgeonFact = surgeonFact + 4; elseif weight == 3 then surgeonFact = surgeonFact + 6;