1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-05 10:00:26 +01:00

trap spike don't re-kill dead player, fix multidead, issue https://github.com/MinetestForFun/server-minetestforfun/issues/375

This commit is contained in:
crabman77 2016-01-08 01:04:04 +01:00
parent 40b3e17894
commit b0a4dac7ef

View File

@ -155,7 +155,9 @@ minetest.register_abm(
action = function(pos, node, active_object_count, active_object_count_wider)
local objs = minetest.get_objects_inside_radius(pos, 1)
for k, obj in pairs(objs) do
if obj:get_hp() > 0 then --MFF (crabman 8/1/2016) dont re-kill dead player
obj:set_hp(obj:get_hp()-1)
end
minetest.sound_play("bobblocks_trap_fall",
{pos = pos, gain = 1.0, max_hear_distance = 3,})
end
@ -169,7 +171,9 @@ minetest.register_abm(
action = function(pos, node, active_object_count, active_object_count_wider)
local objs = minetest.get_objects_inside_radius(pos, 1)
for k, obj in pairs(objs) do
if obj:get_hp() > 0 then --MFF (crabman 8/1/2016) dont re-kill dead player
obj:set_hp(obj:get_hp()-100)
end
minetest.sound_play("bobblocks_trap_fall",
{pos = pos, gain = 1.0, max_hear_distance = 3,})
end
@ -185,7 +189,9 @@ minetest.register_abm(
pos.y = pos.y-1.2
local objs = minetest.get_objects_inside_radius(pos, 1)
for k, obj in pairs(objs) do
if obj:get_hp() > 0 then --MFF (crabman 8/1/2016) dont re-kill dead player
obj:set_hp(obj:get_hp()-100)
end
minetest.sound_play("bobblocks_trap_fall",
{pos = pos, gain = 1.0, max_hear_distance = 3,})
end