During kmatrix bring up Game_wind againso the host can still follow the game - becomes necessary later with host-authority functions

This commit is contained in:
zicodxx 2012-05-14 19:20:18 +02:00
parent d3fb313fd9
commit 2bed74b056
3 changed files with 18 additions and 6 deletions

View file

@ -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
--------

View file

@ -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

View file

@ -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