Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/GameNetwork/GameInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class GameInfo
virtual void closeOpenSlots(); ///< close all slots that are currently unoccupied.

// CRC checking hack
void setCRCInterval( Int val ) { m_crcInterval = (val<100)?val:100; }
void setCRCInterval( Int val ) { m_crcInterval = (val<1)?1:(val<100)?val:100; }
Int getCRCInterval() const { return m_crcInterval; }

Bool haveWeSurrendered() { return m_surrendered; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3143,7 +3143,8 @@ void GameLogic::update()
// would be getting the CRC anyway, so replays can get the CRCs from the exact instant in time as the original.
Bool isMPGameOrReplay = (TheRecorder && TheRecorder->isMultiplayer() && getGameMode() != GAME_SHELL && getGameMode() != GAME_NONE);
Bool isSoloGameOrReplay = (TheRecorder && !TheRecorder->isMultiplayer() && getGameMode() != GAME_SHELL && getGameMode() != GAME_NONE);
Bool generateForMP = (isMPGameOrReplay && (m_frame % TheGameInfo->getCRCInterval()) == 0);
Int crcInterval = TheGameInfo ? TheGameInfo->getCRCInterval() : 0;
Bool generateForMP = (isMPGameOrReplay && crcInterval > 0 && (m_frame % crcInterval) == 0);
#ifdef DEBUG_CRC
Bool generateForSolo = isSoloGameOrReplay && ((m_frame && (m_frame%100 == 0)) ||
(getFrame() >= TheCRCFirstFrameToLog && getFrame() < TheCRCLastFrameToLog && ((m_frame % REPLAY_CRC_INTERVAL) == 0)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3889,7 +3889,8 @@ void GameLogic::update()
// would be getting the CRC anyway, so replays can get the CRCs from the exact instant in time as the original.
Bool isMPGameOrReplay = (TheRecorder && TheRecorder->isMultiplayer() && getGameMode() != GAME_SHELL && getGameMode() != GAME_NONE);
Bool isSoloGameOrReplay = (TheRecorder && !TheRecorder->isMultiplayer() && getGameMode() != GAME_SHELL && getGameMode() != GAME_NONE);
Bool generateForMP = (isMPGameOrReplay && (m_frame % TheGameInfo->getCRCInterval()) == 0);
Int crcInterval = TheGameInfo ? TheGameInfo->getCRCInterval() : 0;
Bool generateForMP = (isMPGameOrReplay && crcInterval > 0 && (m_frame % crcInterval) == 0);
#ifdef DEBUG_CRC
Bool generateForSolo = isSoloGameOrReplay && ((m_frame && (m_frame % 100 == 0)) ||
(getFrame() >= TheCRCFirstFrameToLog && getFrame() < TheCRCLastFrameToLog && ((m_frame % REPLAY_CRC_INTERVAL) == 0)));
Expand Down
Loading