From 4de307512078ad02a17bd8c8dad8587fbb08e36b Mon Sep 17 00:00:00 2001 From: DragonTrance Date: Thu, 25 Feb 2021 14:14:39 -0700 Subject: [PATCH] squashes defib runtime --- code/game/objects/items/defib.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index a4f286bf..93ec8088 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -628,6 +628,8 @@ H.adjustOxyLoss(H.health - HALFWAYCRITDEATH, 0) else var/overall_damage = total_brute + total_burn + H.getToxLoss() + H.getOxyLoss() + if(!overall_damage) //Avoid divide-by runtime + overall_damage = 1 var/mobhealth = H.health H.adjustOxyLoss((mobhealth - HALFWAYCRITDEATH) * (H.getOxyLoss() / overall_damage), 0) H.adjustToxLoss((mobhealth - HALFWAYCRITDEATH) * (H.getToxLoss() / overall_damage), 0)