mirror of
https://repo.or.cz/minetest_playereffects.git
synced 2025-01-08 10:20:15 +01:00
Stop repeater effect if entity died
This commit is contained in:
parent
e24c55d0bd
commit
9b3b4d1c32
2
init.lua
2
init.lua
@ -206,7 +206,7 @@ end
|
||||
|
||||
function playereffects.repeater(effect_id, repetitions, entity, apply)
|
||||
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
|
||||
apply(entity)
|
||||
repetitions = repetitions - 1
|
||||
|
Loading…
Reference in New Issue
Block a user