Since time is not suspended between levels in Multiplayer, call reset_time after level change. Apply this in Singleplayer, too since it should always be safe - and appropriate - to reset timer_value soon as a new level begins

This commit is contained in:
zicodxx 2010-07-04 13:12:08 +00:00
parent faab4b0acb
commit 0a143da860
3 changed files with 6 additions and 12 deletions

View file

@ -5,6 +5,7 @@ D2X-Rebirth Changelog
SConstruct: Fixing Windows build which was not linking against SDL
main/net_udp.c: Fixed Compiler-warning on Windows
main/net_ipx.c, main/net_udp.c: Implemented Winsock functions for UDP which I totally forgot about; Now when leaving game in any way, close sockets and Winsock stuff
main/gameseq.c, main/multi.c: Since time is not suspended between levels in Multiplayer, call reset_time after level change. Apply this in Singleplayer, too since it should always be safe - and appropriate - to reset timer_value soon as a new level begins
20100701
--------

View file

@ -1181,6 +1181,7 @@ void ExitSecretLevel(void)
if (Game_wind)
window_set_visible(Game_wind, 1);
reset_time();
}
// ---------------------------------------------------------------------------------------------------------------
@ -1254,6 +1255,7 @@ void EnterSecretLevel(void)
// do_cloak_invul_stuff();
if (Game_wind)
window_set_visible(Game_wind, 1);
reset_time();
}
//called when the player has finished a level
@ -1276,6 +1278,7 @@ void PlayerFinishedLevel(int secret_flag)
if (Game_wind)
window_set_visible(Game_wind, 1);
reset_time();
}
#if defined(D2_OEM) || defined(COMPILATION)
@ -1565,6 +1568,7 @@ void DoPlayerDead()
if (Game_wind)
window_set_visible(Game_wind, 1);
reset_time();
}
extern int BigWindowSwitch;
@ -1985,8 +1989,6 @@ void StartLevel(int random_flag)
init_ai_objects();
#endif
// reset_time(); Time is stopped and should be resumed soon. You shall be obsolete!
reset_rear_view();
Auto_fire_fusion_cannon_time = 0;
Fusion_charge = 0;

View file

@ -452,7 +452,7 @@ int multi_objnum_is_past(int objnum)
void
multi_endlevel_score(void)
{
int i, old_connect=0, old_vis = 1;
int i, old_connect=0;
// Show a score list to end of net players
@ -469,20 +469,11 @@ multi_endlevel_score(void)
// Do the actual screen we wish to show
if (Game_wind)
{
old_vis = window_is_visible(Game_wind);
window_set_visible(Game_wind, 0);
}
if (multi_protocol == MULTI_PROTO_IPX)
kmatrix_ipx_view(Game_mode & GM_NETWORK);
else
kmatrix_view(Game_mode & GM_NETWORK);
if (Game_wind)
window_set_visible(Game_wind, old_vis);
// Restore connect state
if (Game_mode & GM_NETWORK)