diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-07-18 13:53:15 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-07-18 13:53:15 +0200 |
commit | ffe3c2ae0db6fed0f2b08b71bfa69f3d3df3bb1f (patch) | |
tree | cc7d9f74a43215c5d8e3965a2bfc2aea5867a7a0 /src/script/cpp_api/s_entity.cpp | |
parent | 45aa2516b2fc675df7049bc9ed713600c95b6423 (diff) | |
parent | 82731d0d3d8bfe9e56f89466991f13c037f3a61e (diff) | |
download | dragonfireclient-ffe3c2ae0db6fed0f2b08b71bfa69f3d3df3bb1f.tar.xz |
Update to minetest 5.4.0-dev
Diffstat (limited to 'src/script/cpp_api/s_entity.cpp')
-rw-r--r-- | src/script/cpp_api/s_entity.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/script/cpp_api/s_entity.cpp b/src/script/cpp_api/s_entity.cpp index 26c7e8cd4..ea9320051 100644 --- a/src/script/cpp_api/s_entity.cpp +++ b/src/script/cpp_api/s_entity.cpp @@ -178,12 +178,11 @@ void ScriptApiEntity::luaentity_GetProperties(u16 id, lua_pop(L, 1); } -void ScriptApiEntity::luaentity_Step(u16 id, float dtime) +void ScriptApiEntity::luaentity_Step(u16 id, float dtime, + const collisionMoveResult *moveresult) { SCRIPTAPI_PRECHECKHEADER - //infostream<<"scriptapi_luaentity_step: id="<<id<<std::endl; - int error_handler = PUSH_ERROR_HANDLER(L); // Get core.luaentities[id] @@ -199,9 +198,14 @@ void ScriptApiEntity::luaentity_Step(u16 id, float dtime) luaL_checktype(L, -1, LUA_TFUNCTION); lua_pushvalue(L, object); // self lua_pushnumber(L, dtime); // dtime + /* moveresult */ + if (moveresult) + push_collision_move_result(L, *moveresult); + else + lua_pushnil(L); setOriginFromTable(object); - PCALL_RES(lua_pcall(L, 2, 0, error_handler)); + PCALL_RES(lua_pcall(L, 3, 0, error_handler)); lua_pop(L, 2); // Pop object and error handler } |