mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-20 03:33:43 +01:00
Preserve fall_damage_add_percent when setting player armor (#81)
This commit is contained in:
parent
c7ee559a4c
commit
eebee34fa0
@ -491,10 +491,13 @@ armor.set_player_armor = function(self, player)
|
||||
armor_monoid.monoid:add_change(player, change, "3d_armor:armor")
|
||||
else
|
||||
-- Preserve immortal group (damage disabled for player)
|
||||
local immortal = player:get_armor_groups().immortal
|
||||
local player_groups = player:get_armor_groups()
|
||||
local immortal = player_groups.immortal
|
||||
if immortal and immortal ~= 0 then
|
||||
groups.immortal = 1
|
||||
end
|
||||
-- Preserve fall_damage_add_percent group (fall damage modifier)
|
||||
groups.fall_damage_add_percent = player_groups.fall_damage_add_percent
|
||||
player:set_armor_groups(groups)
|
||||
end
|
||||
if use_player_monoids then
|
||||
|
Loading…
Reference in New Issue
Block a user