diff options
| author | Alexander <alex@cogarr.net> | 2019-04-24 21:16:08 -0400 |
|---|---|---|
| committer | Alexander <alex@cogarr.net> | 2019-04-24 21:16:08 -0400 |
| commit | 3d60e1432ec43ade4aa61b5a70dd6b8975417e9f (patch) | |
| tree | 954719a0f4a27fe42f9d8113844a21b79ae70f5d /src/server/main.cpp | |
| parent | 42bedce123739287339a95626675ffda3a1ce8e7 (diff) | |
| download | brokengine-3d60e1432ec43ade4aa61b5a70dd6b8975417e9f.tar.gz brokengine-3d60e1432ec43ade4aa61b5a70dd6b8975417e9f.tar.bz2 brokengine-3d60e1432ec43ade4aa61b5a70dd6b8975417e9f.zip | |
updates
Diffstat (limited to 'src/server/main.cpp')
| -rw-r--r-- | src/server/main.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
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); |
