From 8dfde0051d90a529400846223b9f76e7baf4779c Mon Sep 17 00:00:00 2001 From: Nikolay Borodin Date: Mon, 28 Oct 2024 19:47:41 +0200 Subject: [PATCH] Check if shields are present --- src/combat.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/combat.cpp b/src/combat.cpp index db94e0dcb16..ffd25ec0e21 100644 --- a/src/combat.cpp +++ b/src/combat.cpp @@ -432,8 +432,10 @@ int32_t objDamage(BASE_OBJECT *psObj, unsigned damage, unsigned originalhp, WEAP { DROID *psDroid = castDroid(psObj); - // EMP weapons kills droid shields completely - psDroid->shieldPoints = 0; + if (psDroid->shieldPoints != -1) { + // EMP weapons kills droid shields completely + psDroid->shieldPoints = 0; + } } return 0; }