Fix radiation protection when armor group is not set

The radiation damage group can be not set when armor completely
protects against radiation or when no mod has set a default value
for the damage group. We want to apply radiation damage in the
second case but not in the first.
This commit is contained in:
coil 2019-08-22 17:29:56 -04:00
parent bb05ff8fd2
commit 61141c5441
No known key found for this signature in database
GPG Key ID: 96224F28B6FF6DD3

View File

@ -294,6 +294,8 @@ local function calculate_damage_multiplier(object)
end
if ag.radiation then
return 0.01 * ag.radiation
elseif armor_enabled then
return 0
end
if ag.fleshy then
return math.sqrt(0.01 * ag.fleshy)