mirror of
https://repo.or.cz/minetest_playereffects.git
synced 2025-01-09 18:40:18 +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)
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user