-
Notifications
You must be signed in to change notification settings - Fork 162
bugfix: Prevent fallen Angry Mob members respawning at the Barracks after loading a save #2314
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 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1069,14 +1069,19 @@ void SpawnBehavior::crc( Xfer *xfer ) | |||||||||||
| * Version Info: | ||||||||||||
| * 1: Initial version | ||||||||||||
| * 2: Added m_initialBurstTimesInited to the save. jba. | ||||||||||||
| * 3: TheSuperHackers @bugfix Stubbjax 16/02/2026 Added m_initialBurstCountdown. | ||||||||||||
| */ | ||||||||||||
| // ------------------------------------------------------------------------------------------------ | ||||||||||||
| void SpawnBehavior::xfer( Xfer *xfer ) | ||||||||||||
| { | ||||||||||||
| AsciiString name; | ||||||||||||
|
|
||||||||||||
| // version | ||||||||||||
| #if RETAIL_COMPATIBLE_XFER_SAVE | ||||||||||||
| XferVersion currentVersion = 2; | ||||||||||||
| #else | ||||||||||||
| XferVersion currentVersion = 3; | ||||||||||||
| #endif | ||||||||||||
| XferVersion version = currentVersion; | ||||||||||||
| xfer->xferVersion( &version, currentVersion ); | ||||||||||||
|
|
||||||||||||
|
|
@@ -1088,6 +1093,9 @@ void SpawnBehavior::xfer( Xfer *xfer ) | |||||||||||
| xfer->xferBool(&m_initialBurstTimesInited); | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| if (version >= 3) | ||||||||||||
| xfer->xferUnsignedInt(&m_initialBurstCountdown); | ||||||||||||
|
Comment on lines
+1096
to
+1097
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. Inconsistent brace style with surrounding code (line 1092-1094 uses braces)
Suggested change
Context Used: Rule from Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! Prompt To Fix With AIThis is a comment left during a code review.
Path: GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/SpawnBehavior.cpp
Line: 1096:1097
Comment:
Inconsistent brace style with surrounding code (line 1092-1094 uses braces)
```suggestion
if (version >= 3) {
xfer->xferUnsignedInt(&m_initialBurstCountdown);
}
```
**Context Used:** Rule from `dashboard` - Always place if/else/for/while statement bodies on separate lines from the condition to allow precis... ([source](https://app.greptile.com/review/custom-context?memory=16b9b669-b823-49be-ba5b-2bd30ff3ba6d))
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise. |
||||||||||||
|
|
||||||||||||
| // spawn template | ||||||||||||
| name = m_spawnTemplate ? m_spawnTemplate->getName() : AsciiString::TheEmptyString; | ||||||||||||
| xfer->xferAsciiString( &name ); | ||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent brace style with surrounding code (line 1007-1009 uses braces)
Context Used: Rule from
dashboard- Always place if/else/for/while statement bodies on separate lines from the condition to allow precis... (source)Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI