oops, previous commit was not working

it is working now
This commit is contained in:
Juan Linietsky
2015-05-26 01:30:36 -03:00
parent 9df77d2765
commit b1b7826ea7
4 changed files with 15 additions and 6 deletions
@@ -61,7 +61,12 @@ void Physics2DServerWrapMT::step(float p_step) {
void Physics2DServerWrapMT::sync() {
step_sem->wait();
if (step_sem) {
if (first_frame)
first_frame=false;
else
step_sem->wait(); //must not wait if a step was not issued
}
physics_2d_server->sync();;
}
@@ -147,6 +152,9 @@ Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer* p_contained,bool p
} else {
server_thread=0;
}
main_thread = Thread::get_caller_ID();
first_frame=true;
}