Preserve immortal group for per-player damage

This commit is contained in:
SmallJoker 2019-10-07 20:12:58 +02:00
parent 47ecef46f7
commit a05eae3782

@ -279,6 +279,11 @@ armor.set_player_armor = function(self, player)
if use_armor_monoid then if use_armor_monoid then
armor_monoid.monoid:add_change(player, change, "3d_armor:armor") armor_monoid.monoid:add_change(player, change, "3d_armor:armor")
else else
-- Preserve immortal group (damage disabled for player)
local immortal = player:get_armor_groups().immortal
if immortal and immortal ~= 0 then
groups.immortal = 1
end
player:set_armor_groups(groups) player:set_armor_groups(groups)
end end
if use_player_monoids then if use_player_monoids then