aboutsummaryrefslogtreecommitdiff
path: root/src/server/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/main.cpp')
-rw-r--r--src/server/main.cpp17
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);