forked from mtcontrib/minetest_playereffects
Stop repeater effect if entity died
This commit is contained in:
2
init.lua
2
init.lua
@ -206,7 +206,7 @@ end
|
|||||||
|
|
||||||
function playereffects.repeater(effect_id, repetitions, entity, apply)
|
function playereffects.repeater(effect_id, repetitions, entity, apply)
|
||||||
local effect = playereffects.effects[effect_id]
|
local effect = playereffects.effects[effect_id]
|
||||||
if(effect ~= nil) then
|
if(effect ~= nil and entity ~= nil and entity:get_luaentity() ~= nil) then
|
||||||
local repetitions = effect.time_left
|
local repetitions = effect.time_left
|
||||||
apply(entity)
|
apply(entity)
|
||||||
repetitions = repetitions - 1
|
repetitions = repetitions - 1
|
||||||
|
Reference in New Issue
Block a user