Repository navigation
tweak(gamemessage): Add separate game message type for playback CRC #3391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1587,9 +1587,10 @@ RecorderClass::CullBadCommandsResult RecorderClass::cullBadCommands() { | |
|
|
||
| while (msg != nullptr) { | ||
| next = msg->next(); | ||
| if ((msg->getType() > GameMessage::MSG_BEGIN_NETWORK_MESSAGES) && | ||
| (msg->getType() < GameMessage::MSG_END_NETWORK_MESSAGES) && | ||
| (msg->getType() != GameMessage::MSG_LOGIC_CRC)) { | ||
| if (msg->getType() > GameMessage::MSG_BEGIN_NETWORK_MESSAGES && msg->getType() < GameMessage::MSG_END_NETWORK_MESSAGES) | ||
|
macroscopeapp[bot] marked this conversation as resolved.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this test for playback crc like it did before for logic crc?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, because EDIT: |
||
| { | ||
| DEBUG_ASSERTCRASH(msg->getType() != GameMessage::MSG_LOGIC_CRC, | ||
| ("Use MSG_LOGIC_CRC_PLAYBACK instead of MSG_LOGIC_CRC during replay playback")); | ||
|
|
||
| deleteInstance(msg); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3768,11 +3768,13 @@ void GameLogic::update() | |
| if (generateForSolo || generateForMP) | ||
| { | ||
| m_CRC = getCRC( CRC_RECALC ); | ||
| bool isPlayback = (TheRecorder && TheRecorder->isPlaybackMode()); | ||
| const bool isPlayback = (TheRecorder && TheRecorder->isPlaybackMode()); | ||
|
|
||
| GameMessage *msg = newInstance(GameMessage)(GameMessage::MSG_LOGIC_CRC); | ||
| // TheSuperHackers @tweak Caball009 30/09/2026 Playback CRC is now separate from regular CRC, | ||
| // removing the need for the second parameter used to distinguish them. Older clients can still | ||
| // parse newer replays because GameMessage::getArgument returns false for the missing playback argument. | ||
| GameMessage *msg = newInstance(GameMessage)(isPlayback ? GameMessage::MSG_LOGIC_CRC_PLAYBACK : GameMessage::MSG_LOGIC_CRC); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it make sense cache this message type in
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean? |
||
| msg->appendIntegerArgument(m_CRC); | ||
| msg->appendBooleanArgument(isPlayback); | ||
|
|
||
| // TheSuperHackers @info helmutbuhler 13/04/2025 | ||
| // During replay simulation, we bypass TheMessageStream and instead put the CRC message | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.