mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-12-27 11:10:39 +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")
|
armor_monoid.monoid:add_change(player, change, "3d_armor:armor")
|
||||||
else
|
else
|
||||||
-- Preserve immortal group (damage disabled for player)
|
-- 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
|
if immortal and immortal ~= 0 then
|
||||||
groups.immortal = 1
|
groups.immortal = 1
|
||||||
end
|
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)
|
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