From 2bed74b05649d9d3350875ba90534a1903df3ea6 Mon Sep 17 00:00:00 2001 From: zicodxx Date: Mon, 14 May 2012 19:20:18 +0200 Subject: [PATCH] During kmatrix bring up Game_wind againso the host can still follow the game - becomes necessary later with host-authority functions --- CHANGELOG.txt | 1 + main/multi.c | 21 ++++++++++++++++----- main/object.c | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9d1eddba5..54c583dfc 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ D2X-Rebirth Changelog 2d/disc.c, SConstruct, editor/medmisc.c, include/gr.h, include/internal.h, main/gauges.c, main/menu.c, main/net_udp.c, main/playsave.c, main/state.c, misc/hmp.c, misc/physfsx.c: Fixed some non-critical compiler warnings; Now compiling with -std=c99 -pedantic and fixed warnings (except for editor build) caused by this 2d/bitblt.c, 2d/pixel.c, arch/sdl/digi_mixer.c, main/gauges.c, main/menu.c: Made inline functions static include/gr.h, main/ai.c, main/ai2.c, main/aipath.c, main/automap.c, main/cntrlcen.c, main/escort.c, main/fuelcen.c, main/game.c, main/game.h, main/gamecntl.c, main/gamerend.c, main/gamesave.c, main/laser.c, main/mglobal.c, main/object.c, main/object.h, main/render.c, main/texmerge.c, main/wall.c, main/weapon.c: Renamed FixedStepCalc() to cald_d_tick() and FixedStep became d_tick_step; Also ther eonly is a 50ms-timer used to d_tick_step as it was the only one used so far; Replaced FrameCount with d_tick_count which only increments by 50ms-timer used in calc_d_tick() - that now scales timed actions for certain functions properly and makes AI work FPS-independent without any hacks in that regard +main/multi.c: During kmatrix bring up Game_wind againso the host can still follow the game - becomes necessary later with host-authority functions 20120510 -------- diff --git a/main/multi.c b/main/multi.c index 54d0c3728..3c843f62a 100644 --- a/main/multi.c +++ b/main/multi.c @@ -424,13 +424,20 @@ int multi_objnum_is_past(int objnum) // on the curretn Game_mode value. // -void -multi_endlevel_score(void) +// Show a score list to end of net players +void multi_endlevel_score(void) { - int i, old_connect=0; - - // Show a score list to end of net players + int i, old_connect=0, game_wind_visible = 0; + // If there still is a Game_wind and it's suspended (usually both shoudl be the case), bring it up again so host can still take actions of the game + if (Game_wind) + { + if (!window_is_visible(Game_wind)) + { + game_wind_visible = 1; + window_set_visible(Game_wind, 1); + } + } // Save connect state and change to new connect state #ifdef NETWORK if (Game_mode & GM_NETWORK) @@ -470,6 +477,10 @@ multi_endlevel_score(void) MaxPowerupsAllowed[i]=0; PowerupsInMine[i]=0; } + + // hide Game_wind again if we brought it up + if (Game_wind && game_wind_visible) + window_set_visible(Game_wind, 0); } int diff --git a/main/object.c b/main/object.c index 2e5fb586c..bd2f0bc2c 100644 --- a/main/object.c +++ b/main/object.c @@ -1838,7 +1838,7 @@ void object_move_one( object * obj ) { #ifndef DEMO_ONLY - +printf("MOVE %i\n",timer_query()); int previous_segment = obj->segnum; obj->last_pos = obj->pos; // Save the current position