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:
parent
40b3e17894
commit
b0a4dac7ef
|
@ -155,7 +155,9 @@ minetest.register_abm(
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
local objs = minetest.get_objects_inside_radius(pos, 1)
|
local objs = minetest.get_objects_inside_radius(pos, 1)
|
||||||
for k, obj in pairs(objs) do
|
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)
|
obj:set_hp(obj:get_hp()-1)
|
||||||
|
end
|
||||||
minetest.sound_play("bobblocks_trap_fall",
|
minetest.sound_play("bobblocks_trap_fall",
|
||||||
{pos = pos, gain = 1.0, max_hear_distance = 3,})
|
{pos = pos, gain = 1.0, max_hear_distance = 3,})
|
||||||
end
|
end
|
||||||
|
@ -169,7 +171,9 @@ minetest.register_abm(
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
local objs = minetest.get_objects_inside_radius(pos, 1)
|
local objs = minetest.get_objects_inside_radius(pos, 1)
|
||||||
for k, obj in pairs(objs) do
|
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)
|
obj:set_hp(obj:get_hp()-100)
|
||||||
|
end
|
||||||
minetest.sound_play("bobblocks_trap_fall",
|
minetest.sound_play("bobblocks_trap_fall",
|
||||||
{pos = pos, gain = 1.0, max_hear_distance = 3,})
|
{pos = pos, gain = 1.0, max_hear_distance = 3,})
|
||||||
end
|
end
|
||||||
|
@ -185,7 +189,9 @@ minetest.register_abm(
|
||||||
pos.y = pos.y-1.2
|
pos.y = pos.y-1.2
|
||||||
local objs = minetest.get_objects_inside_radius(pos, 1)
|
local objs = minetest.get_objects_inside_radius(pos, 1)
|
||||||
for k, obj in pairs(objs) do
|
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)
|
obj:set_hp(obj:get_hp()-100)
|
||||||
|
end
|
||||||
minetest.sound_play("bobblocks_trap_fall",
|
minetest.sound_play("bobblocks_trap_fall",
|
||||||
{pos = pos, gain = 1.0, max_hear_distance = 3,})
|
{pos = pos, gain = 1.0, max_hear_distance = 3,})
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user