Skip to content

Commit 927e7b8

Browse files
committed
chore: Ensure xfer compatibility
1 parent 7b7960f commit 927e7b8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/PoisonedBehavior.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ void PoisonedBehavior::xfer( Xfer *xfer )
213213
{
214214

215215
// version
216+
#if RETAIL_COMPATIBLE_XFER_SAVE
217+
const XferVersion currentVersion = 2;
218+
#else
216219
const XferVersion currentVersion = 3;
220+
#endif
217221
XferVersion version = currentVersion;
218222
xfer->xferVersion( &version, currentVersion );
219223

@@ -234,10 +238,12 @@ void PoisonedBehavior::xfer( Xfer *xfer )
234238
xfer->xferUser(&m_deathType, sizeof(m_deathType));
235239
}
236240

241+
#if !RETAIL_COMPATIBLE_XFER_SAVE
237242
if (version >= 3)
238243
{
239244
xfer->xferObjectID(&m_poisonSource);
240245
}
246+
#endif
241247
}
242248

243249
// ------------------------------------------------------------------------------------------------

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/PoisonedBehavior.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ void PoisonedBehavior::xfer( Xfer *xfer )
214214
{
215215

216216
// version
217+
#if RETAIL_COMPATIBLE_XFER_SAVE
218+
const XferVersion currentVersion = 2;
219+
#else
217220
const XferVersion currentVersion = 3;
221+
#endif
218222
XferVersion version = currentVersion;
219223
xfer->xferVersion( &version, currentVersion );
220224

@@ -235,10 +239,12 @@ void PoisonedBehavior::xfer( Xfer *xfer )
235239
xfer->xferUser(&m_deathType, sizeof(m_deathType));
236240
}
237241

242+
#if !RETAIL_COMPATIBLE_XFER_SAVE
238243
if (version >= 3)
239244
{
240245
xfer->xferObjectID(&m_poisonSource);
241246
}
247+
#endif
242248
}
243249

244250
// ------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)