1
0
Fork 0

fix undeacleared vars in mcl_throwing

formspec-v4
AFCMS 2021-04-02 14:27:35 +02:00
parent 0da8339352
commit ead33e3520
2 changed files with 8 additions and 8 deletions

View File

@ -58,7 +58,7 @@ function mcl_throwing.dispense_function(stack, dispenserpos, droppos, dropnode,
end
-- Staticdata handling because objects may want to be reloaded
local get_staticdata = function(self)
function mcl_throwing.get_staticdata(self)
local thrower
-- Only save thrower if it's a player name
if type(self._thrower) == "string" then
@ -71,7 +71,7 @@ local get_staticdata = function(self)
return minetest.serialize(data)
end
local on_activate = function(self, staticdata, dtime_s)
function mcl_throwing.on_activate(self, staticdata, dtime_s)
local data = minetest.deserialize(staticdata)
if data then
self._lastpos = data._lastpos

View File

@ -9,8 +9,8 @@ local snowball_ENTITY={
collisionbox = {0,0,0,0,0,0},
pointable = false,
get_staticdata = get_staticdata,
on_activate = on_activate,
get_staticdata = mcl_throwing.get_staticdata,
on_activate = mcl_throwing.on_activate,
_thrower = nil,
_lastpos={},
@ -23,8 +23,8 @@ local egg_ENTITY={
collisionbox = {0,0,0,0,0,0},
pointable = false,
get_staticdata = get_staticdata,
on_activate = on_activate,
get_staticdata = mcl_throwing.get_staticdata,
on_activate = mcl_throwing.on_activate,
_thrower = nil,
_lastpos={},
@ -38,8 +38,8 @@ local pearl_ENTITY={
collisionbox = {0,0,0,0,0,0},
pointable = false,
get_staticdata = get_staticdata,
on_activate = on_activate,
get_staticdata = mcl_throwing.get_staticdata,
on_activate = mcl_throwing.on_activate,
_lastpos={},
_thrower = nil, -- Player ObjectRef of the player who threw the ender pearl