1
0
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:
Wuzzy 2019-02-22 04:30:18 +01:00
parent e24c55d0bd
commit 9b3b4d1c32

View File

@ -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