Fix wrong check

This commit is contained in:
Raffson 2023-11-18 20:32:06 +01:00
parent cade8f4a19
commit 5043a1b8ac
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -683,7 +683,7 @@ end
function destroyedBda(unit) function destroyedBda(unit)
if unit == nil then if unit == nil then
gameMsg("BDA: target destroyed") gameMsg("BDA: target destroyed")
elseif unit:getName() == nil then elseif unit:getTypeName() == nil then
gameMsg("BDA: target destroyed") gameMsg("BDA: target destroyed")
else else
gameMsg("BDA: "..unit:getTypeName().." critically damaged") gameMsg("BDA: "..unit:getTypeName().." critically damaged")