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:
parent
faab4b0acb
commit
0a143da860
|
@ -5,6 +5,7 @@ D2X-Rebirth Changelog
|
||||||
SConstruct: Fixing Windows build which was not linking against SDL
|
SConstruct: Fixing Windows build which was not linking against SDL
|
||||||
main/net_udp.c: Fixed Compiler-warning on Windows
|
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/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
|
20100701
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -1181,6 +1181,7 @@ void ExitSecretLevel(void)
|
||||||
|
|
||||||
if (Game_wind)
|
if (Game_wind)
|
||||||
window_set_visible(Game_wind, 1);
|
window_set_visible(Game_wind, 1);
|
||||||
|
reset_time();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1254,6 +1255,7 @@ void EnterSecretLevel(void)
|
||||||
// do_cloak_invul_stuff();
|
// do_cloak_invul_stuff();
|
||||||
if (Game_wind)
|
if (Game_wind)
|
||||||
window_set_visible(Game_wind, 1);
|
window_set_visible(Game_wind, 1);
|
||||||
|
reset_time();
|
||||||
}
|
}
|
||||||
|
|
||||||
//called when the player has finished a level
|
//called when the player has finished a level
|
||||||
|
@ -1276,6 +1278,7 @@ void PlayerFinishedLevel(int secret_flag)
|
||||||
|
|
||||||
if (Game_wind)
|
if (Game_wind)
|
||||||
window_set_visible(Game_wind, 1);
|
window_set_visible(Game_wind, 1);
|
||||||
|
reset_time();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(D2_OEM) || defined(COMPILATION)
|
#if defined(D2_OEM) || defined(COMPILATION)
|
||||||
|
@ -1565,6 +1568,7 @@ void DoPlayerDead()
|
||||||
|
|
||||||
if (Game_wind)
|
if (Game_wind)
|
||||||
window_set_visible(Game_wind, 1);
|
window_set_visible(Game_wind, 1);
|
||||||
|
reset_time();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int BigWindowSwitch;
|
extern int BigWindowSwitch;
|
||||||
|
@ -1985,8 +1989,6 @@ void StartLevel(int random_flag)
|
||||||
init_ai_objects();
|
init_ai_objects();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// reset_time(); Time is stopped and should be resumed soon. You shall be obsolete!
|
|
||||||
|
|
||||||
reset_rear_view();
|
reset_rear_view();
|
||||||
Auto_fire_fusion_cannon_time = 0;
|
Auto_fire_fusion_cannon_time = 0;
|
||||||
Fusion_charge = 0;
|
Fusion_charge = 0;
|
||||||
|
|
11
main/multi.c
11
main/multi.c
|
@ -452,7 +452,7 @@ int multi_objnum_is_past(int objnum)
|
||||||
void
|
void
|
||||||
multi_endlevel_score(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
|
// 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
|
// 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)
|
if (multi_protocol == MULTI_PROTO_IPX)
|
||||||
kmatrix_ipx_view(Game_mode & GM_NETWORK);
|
kmatrix_ipx_view(Game_mode & GM_NETWORK);
|
||||||
else
|
else
|
||||||
kmatrix_view(Game_mode & GM_NETWORK);
|
kmatrix_view(Game_mode & GM_NETWORK);
|
||||||
|
|
||||||
if (Game_wind)
|
|
||||||
window_set_visible(Game_wind, old_vis);
|
|
||||||
|
|
||||||
// Restore connect state
|
// Restore connect state
|
||||||
|
|
||||||
if (Game_mode & GM_NETWORK)
|
if (Game_mode & GM_NETWORK)
|
||||||
|
|
Loading…
Reference in a new issue