1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fixed too many little issues, check the issues closed today.

This commit is contained in:
Juan Linietsky
2014-09-21 01:43:42 -03:00
parent c5b905fca8
commit 11a5ed508b
24 changed files with 306 additions and 44 deletions

View File

@@ -153,6 +153,7 @@ void Main::print_help(const char* p_binary) {
OS::get_singleton()->print("\t-d,-debug : Debug (local stdout debugger).\n");
OS::get_singleton()->print("\t-rdebug ADDRESS : Remote debug (<ip>:<port> host address).\n");
OS::get_singleton()->print("\t-fdelay [msec]: Simulate high CPU load (delay each frame by [msec]).\n");
OS::get_singleton()->print("\t-timescale [msec]: Simulate high CPU load (delay each frame by [msec]).\n");
OS::get_singleton()->print("\t-bp : breakpoint list as source::line comma separated pairs, no spaces (%%20,%%2C,etc instead).\n");
OS::get_singleton()->print("\t-v : Verbose stdout mode\n");
OS::get_singleton()->print("\t-lang [locale]: Use a specific locale\n");
@@ -420,6 +421,17 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
}
} else if (I->get()=="-timescale") { // resolution
if (I->next()) {
OS::get_singleton()->set_time_scale(I->next()->get().to_double());
N=I->next()->next();
} else {
goto error;
}
} else if (I->get() == "-pack") {
@@ -1292,6 +1304,8 @@ bool Main::iteration() {
time_accum+=step;
float time_scale = OS::get_singleton()->get_time_scale();
bool exit=false;
@@ -1307,15 +1321,15 @@ bool Main::iteration() {
Physics2DServer::get_singleton()->sync();
Physics2DServer::get_singleton()->flush_queries();
if (OS::get_singleton()->get_main_loop()->iteration( frame_slice )) {
if (OS::get_singleton()->get_main_loop()->iteration( frame_slice*time_scale )) {
exit=true;
break;
}
message_queue->flush();
PhysicsServer::get_singleton()->step(frame_slice);
Physics2DServer::get_singleton()->step(frame_slice);
PhysicsServer::get_singleton()->step(frame_slice*time_scale);
Physics2DServer::get_singleton()->step(frame_slice*time_scale);
time_accum-=frame_slice;
message_queue->flush();
@@ -1328,13 +1342,13 @@ bool Main::iteration() {
uint64_t idle_begin = OS::get_singleton()->get_ticks_usec();
OS::get_singleton()->get_main_loop()->idle( step );
OS::get_singleton()->get_main_loop()->idle( step*time_scale );
message_queue->flush();
if (SpatialSoundServer::get_singleton())
SpatialSoundServer::get_singleton()->update( step );
SpatialSoundServer::get_singleton()->update( step*time_scale );
if (SpatialSound2DServer::get_singleton())
SpatialSound2DServer::get_singleton()->update( step );
SpatialSound2DServer::get_singleton()->update( step*time_scale );
if (OS::get_singleton()->can_draw()) {