Do not hang when there's a reset during the game due to sync loss.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2574 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -285,10 +285,12 @@ DoBattle (BATTLE_STATE *bs)
|
|||||||
&& (battleFrameCount - delay) % NETPLAY_CHECKSUM_INTERVAL == 0)
|
&& (battleFrameCount - delay) % NETPLAY_CHECKSUM_INTERVAL == 0)
|
||||||
{
|
{
|
||||||
if (!(GLOBAL (CurrentActivity) & CHECK_ABORT))
|
if (!(GLOBAL (CurrentActivity) & CHECK_ABORT))
|
||||||
|
{
|
||||||
if (!verifyChecksums (battleFrameCount - delay)) {
|
if (!verifyChecksums (battleFrameCount - delay)) {
|
||||||
GLOBAL(CurrentActivity) |= CHECK_ABORT;
|
GLOBAL(CurrentActivity) |= CHECK_ABORT;
|
||||||
resetConnections(ResetReason_syncLoss);
|
resetConnections (ResetReason_syncLoss);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -301,6 +301,9 @@ networkBattleInput(COUNT player, STARSHIPPTR StarShipPtr) {
|
|||||||
return (BATTLE_INPUT_STATE) 0;
|
return (BATTLE_INPUT_STATE) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GLOBAL(CurrentActivity) & CHECK_ABORT)
|
||||||
|
return (BATTLE_INPUT_STATE) 0;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
log_add(log_Warning, "NETPLAY: [%d] stalling for "
|
log_add(log_Warning, "NETPLAY: [%d] stalling for "
|
||||||
"network input. Increase the input delay if this "
|
"network input. Increase the input delay if this "
|
||||||
|
|||||||
Reference in New Issue
Block a user