aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorEkdohibs <nathanael.courant@laposte.net>2016-03-21 12:58:52 +0100
committerparamat <mat.gregory@virginmedia.com>2016-06-11 23:35:17 +0100
commit559dd9946988cd35a7c26bcafe7d0f8c42dc547a (patch)
treefb898f7202095e2bdb996820370dd139b82b30ee /src/script/lua_api
parent27aff22a9b68044d3ea51db731597834336effa3 (diff)
downloadminetest-559dd9946988cd35a7c26bcafe7d0f8c42dc547a.tar.gz
minetest-559dd9946988cd35a7c26bcafe7d0f8c42dc547a.tar.bz2
minetest-559dd9946988cd35a7c26bcafe7d0f8c42dc547a.zip
Make node timers more efficient
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_nodetimer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_nodetimer.cpp b/src/script/lua_api/l_nodetimer.cpp
index 601113516..3242d6ea5 100644
--- a/src/script/lua_api/l_nodetimer.cpp
+++ b/src/script/lua_api/l_nodetimer.cpp
@@ -45,7 +45,7 @@ int NodeTimerRef::l_set(lua_State *L)
if(env == NULL) return 0;
f32 t = luaL_checknumber(L,2);
f32 e = luaL_checknumber(L,3);
- env->getMap().setNodeTimer(o->m_p,NodeTimer(t,e));
+ env->getMap().setNodeTimer(NodeTimer(t, e, o->m_p));
return 0;
}
@@ -56,7 +56,7 @@ int NodeTimerRef::l_start(lua_State *L)
ServerEnvironment *env = o->m_env;
if(env == NULL) return 0;
f32 t = luaL_checknumber(L,2);
- env->getMap().setNodeTimer(o->m_p,NodeTimer(t,0));
+ env->getMap().setNodeTimer(NodeTimer(t, 0, o->m_p));
return 0;
}