From 3d60e1432ec43ade4aa61b5a70dd6b8975417e9f Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 24 Apr 2019 21:16:08 -0400 Subject: updates --- src/server/main.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/server/main.cpp') diff --git a/src/server/main.cpp b/src/server/main.cpp index b326e5f..c4c4d8e 100644 --- a/src/server/main.cpp +++ b/src/server/main.cpp @@ -34,9 +34,15 @@ bool game_active = true; void dropRigidBody(btRigidBody* rb){ } +void dropCollisionObject(btCollisionObject* obj){ +} + void dropChar(btKinematicCharacterController *a){ } +void dropGhostObject(btGhostObject *ghost){ +} + lua_State* L; void gameloop(){ gameloop_phys(NULL); @@ -106,15 +112,16 @@ int main (int argc, char *argv[]){ //std::this_thread::yield(); std::this_thread::sleep_for(std::chrono::milliseconds(100)); //printf("Thread yeild\n"); - lua_getglobal(L,"GAME");//{} - lua_getfield(L,-1,"tick");//{},function_tick() + pusherrorfunc(L);//errfunc() + lua_getglobal(L,"GAME");//errfunc(),{} + lua_getfield(L,-1,"tick");//errfunc(),{},function_tick()? if(!lua_isnil(L,-1)){ //printf("Found game tick\n"); - lua_call(L,0,0); - lua_pop(L,1); + lua_pcall(L,0,0,-3);//errfunc(),{} + lua_pop(L,2); }else{ //printf("Did not find tick function\n"); - lua_pop(L,2); + lua_pop(L,3); } //printf("End of server gameloop\n"); }while(game_active); -- cgit v1.2.3-70-g09d2