Skip to content
Merged
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 @@ -696,13 +696,19 @@ void DumbProjectileBehavior::crc( Xfer *xfer )
// ------------------------------------------------------------------------------------------------
/** Xfer method
* Version Info:
* 1: Initial version */
* 1: Initial version
* 2: TheSuperHackers @bugfix Added m_currentFlightPathStep for mid-flight save/load.
*/
// ------------------------------------------------------------------------------------------------
void DumbProjectileBehavior::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 Down Expand Up @@ -753,6 +759,11 @@ void DumbProjectileBehavior::xfer( Xfer *xfer )
// lifespan frame
xfer->xferUnsignedInt( &m_lifespanFrame );

if( version >= 2 )
{
xfer->xferInt( &m_currentFlightPathStep );
}

}

// ------------------------------------------------------------------------------------------------
Expand All @@ -764,4 +775,9 @@ void DumbProjectileBehavior::loadPostProcess()
// extend base class
UpdateModule::loadPostProcess();

if( m_flightPathSegments > 0 )
{
calcFlightPath( false );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -747,13 +747,19 @@ void DumbProjectileBehavior::crc( Xfer *xfer )
// ------------------------------------------------------------------------------------------------
/** Xfer method
* Version Info:
* 1: Initial version */
* 1: Initial version
* 2: TheSuperHackers @bugfix Added m_currentFlightPathStep for mid-flight save/load.
*/
// ------------------------------------------------------------------------------------------------
void DumbProjectileBehavior::xfer( Xfer *xfer )
{

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

Expand Down Expand Up @@ -804,6 +810,11 @@ void DumbProjectileBehavior::xfer( Xfer *xfer )
// lifespan frame
xfer->xferUnsignedInt( &m_lifespanFrame );

if( version >= 2 )
{
xfer->xferInt( &m_currentFlightPathStep );
}

}

// ------------------------------------------------------------------------------------------------
Expand All @@ -815,4 +826,9 @@ void DumbProjectileBehavior::loadPostProcess()
// extend base class
UpdateModule::loadPostProcess();

if( m_flightPathSegments > 0 )
{
calcFlightPath( false );
}

}
Loading