summaryrefslogtreecommitdiff
path: root/src/scriptapi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/scriptapi.cpp')
-rw-r--r--src/scriptapi.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp
index 39e2a46e4..9fa927ff3 100644
--- a/src/scriptapi.cpp
+++ b/src/scriptapi.cpp
@@ -6483,7 +6483,7 @@ bool scriptapi_luaentity_add(lua_State *L, u16 id, const char *name)
}
void scriptapi_luaentity_activate(lua_State *L, u16 id,
- const std::string &staticdata)
+ const std::string &staticdata, u32 dtime_s)
{
realitycheck(L);
assert(lua_checkstack(L, 20));
@@ -6501,8 +6501,9 @@ void scriptapi_luaentity_activate(lua_State *L, u16 id,
luaL_checktype(L, -1, LUA_TFUNCTION);
lua_pushvalue(L, object); // self
lua_pushlstring(L, staticdata.c_str(), staticdata.size());
- // Call with 2 arguments, 0 results
- if(lua_pcall(L, 2, 0, 0))
+ lua_pushinteger(L, dtime_s);
+ // Call with 3 arguments, 0 results
+ if(lua_pcall(L, 3, 0, 0))
script_error(L, "error running function on_activate: %s\n",
lua_tostring(L, -1));
}