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
Original file line number Diff line number Diff line change
Expand Up @@ -984,14 +984,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 );

Expand All @@ -1003,6 +1008,9 @@ void SpawnBehavior::xfer( Xfer *xfer )
xfer->xferBool(&m_initialBurstTimesInited);
}

if (version >= 3)
xfer->xferUnsignedInt(&m_initialBurstCountdown);
Comment on lines +1011 to +1012
Copy link

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)

Suggested change
if (version >= 3)
xfer->xferUnsignedInt(&m_initialBurstCountdown);
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)

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
This is a comment left during a code review.
Path: Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/SpawnBehavior.cpp
Line: 1011:1012

Comment:
Inconsistent brace style with surrounding code (line 1007-1009 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 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand All @@ -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
Copy link

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 1092-1094 uses braces)

Suggested change
if (version >= 3)
xfer->xferUnsignedInt(&m_initialBurstCountdown);
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)

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
This 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 );
Expand Down
Loading