mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-24 09:50:31 +01:00
Fix radiation protection when armor group is not set (#509)
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:
parent
76a39e71b9
commit
da95be53ec
@ -294,6 +294,8 @@ local function calculate_damage_multiplier(object)
|
|||||||
end
|
end
|
||||||
if ag.radiation then
|
if ag.radiation then
|
||||||
return 0.01 * ag.radiation
|
return 0.01 * ag.radiation
|
||||||
|
elseif armor_enabled then
|
||||||
|
return 0
|
||||||
end
|
end
|
||||||
if ag.fleshy then
|
if ag.fleshy then
|
||||||
return math.sqrt(0.01 * ag.fleshy)
|
return math.sqrt(0.01 * ag.fleshy)
|
||||||
|
Loading…
Reference in New Issue
Block a user