diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp index 9684b87cdcd..7c4bc633863 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp @@ -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 ); @@ -753,6 +759,11 @@ void DumbProjectileBehavior::xfer( Xfer *xfer ) // lifespan frame xfer->xferUnsignedInt( &m_lifespanFrame ); + if( version >= 2 ) + { + xfer->xferInt( &m_currentFlightPathStep ); + } + } // ------------------------------------------------------------------------------------------------ @@ -764,4 +775,9 @@ void DumbProjectileBehavior::loadPostProcess() // extend base class UpdateModule::loadPostProcess(); + if( m_flightPathSegments > 0 ) + { + calcFlightPath( false ); + } + } diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp index 1c5fcb77dc8..9b782240938 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp @@ -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; +#endif XferVersion version = currentVersion; xfer->xferVersion( &version, currentVersion ); @@ -804,6 +810,11 @@ void DumbProjectileBehavior::xfer( Xfer *xfer ) // lifespan frame xfer->xferUnsignedInt( &m_lifespanFrame ); + if( version >= 2 ) + { + xfer->xferInt( &m_currentFlightPathStep ); + } + } // ------------------------------------------------------------------------------------------------ @@ -815,4 +826,9 @@ void DumbProjectileBehavior::loadPostProcess() // extend base class UpdateModule::loadPostProcess(); + if( m_flightPathSegments > 0 ) + { + calcFlightPath( false ); + } + }