Skip to content
Draft
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 Generals/Code/GameEngine/Include/GameLogic/Scripts.h
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,9 @@ class Script : public MemoryPoolObject, public Snapshot
ScriptAction *m_action; ///< First in a list of actions executed if the conditions are true.
ScriptAction *m_actionFalse;///< First in a list of actions executed if the conditions are false.
Script *m_nextScript; ///< Next in the list of scripts.
UnsignedInt m_frameToEvaluateAt; ///< When to evaluate the conditions next, if m_delayEvaluationSeconds>0.

// Runtime fields - not saved or read.
UnsignedInt m_frameToEvaluateAt; ///< When to evaluate the conditions next, if m_delayEvaluationSeconds>0.
Bool m_hasWarnings; ///< Runtime flag used by the editor only.
AsciiString m_conditionTeamName; ///< Runtime name used by ScriptEngine only.
Real m_conditionTime; ///< Amount of time (cum) to evaluate conditions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -941,13 +941,19 @@ void Script::crc( Xfer *xfer )
// ------------------------------------------------------------------------------------------------
/** Xfer method
* Version Info:
* 1: Initial version */
* 1: Initial version
* 2: TheSuperHackers @bugfix bobtista 13/08/2026 Save the next evaluation frame of delayed scripts
*/
// ------------------------------------------------------------------------------------------------
void Script::xfer( Xfer *xfer )
{

// version
#if RETAIL_COMPATIBLE_XFER_SAVE
XferVersion currentVersion = 1;
#else
XferVersion currentVersion = 2;
Comment thread
bobtista marked this conversation as resolved.
#endif
XferVersion version = currentVersion;
xfer->xferVersion( &version, currentVersion );

Expand All @@ -956,6 +962,11 @@ void Script::xfer( Xfer *xfer )
xfer->xferBool( &active );
setActive( active );

if( version >= 2 )
{
xfer->xferUnsignedInt( &m_frameToEvaluateAt );
}

}

// ------------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion GeneralsMD/Code/GameEngine/Include/GameLogic/Scripts.h
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,9 @@ class Script : public MemoryPoolObject, public Snapshot
ScriptAction *m_action; ///< First in a list of actions executed if the conditions are true.
ScriptAction *m_actionFalse;///< First in a list of actions executed if the conditions are false.
Script *m_nextScript; ///< Next in the list of scripts.
UnsignedInt m_frameToEvaluateAt; ///< When to evaluate the conditions next, if m_delayEvaluationSeconds>0.

// Runtime fields - not saved or read.
UnsignedInt m_frameToEvaluateAt; ///< When to evaluate the conditions next, if m_delayEvaluationSeconds>0.
Bool m_hasWarnings; ///< Runtime flag used by the editor only.
AsciiString m_conditionTeamName; ///< Runtime name used by ScriptEngine only.
Real m_conditionTime; ///< Amount of time (cum) to evaluate conditions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -949,13 +949,19 @@ void Script::crc( Xfer *xfer )
// ------------------------------------------------------------------------------------------------
/** Xfer method
* Version Info:
* 1: Initial version */
* 1: Initial version
* 2: TheSuperHackers @bugfix bobtista 13/08/2026 Save the next evaluation frame of delayed scripts
*/
// ------------------------------------------------------------------------------------------------
void Script::xfer( Xfer *xfer )
{

// version
#if RETAIL_COMPATIBLE_XFER_SAVE
XferVersion currentVersion = 1;
#else
XferVersion currentVersion = 2;
#endif
XferVersion version = currentVersion;
xfer->xferVersion( &version, currentVersion );

Expand All @@ -964,6 +970,11 @@ void Script::xfer( Xfer *xfer )
xfer->xferBool( &active );
setActive( active );

if( version >= 2 )
{
xfer->xferUnsignedInt( &m_frameToEvaluateAt );
}

}

// ------------------------------------------------------------------------------------------------
Expand Down
Loading