mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-26 06:13:45 +01:00
Merge branch 'preserve_immortal' of https://github.com/SmallJoker/minetest-3d_armor
PR: https://github.com/stujones11/minetest-3d_armor/pull/170
This commit is contained in:
commit
fccd4d8b15
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user