mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Improved feature: structures can be dragged. Which ones is defined in a new xml.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=360672&#msg_360672 Requires GameDir >= r2558 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8870 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+24
-12
@@ -2436,18 +2436,6 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
if ( guiCurrentSaveGameVersion >= SNITCH_TRAIT_EXTENDED )
|
||||
{
|
||||
numBytesRead = ReadFieldByField(hFile, &this->usSoldierFlagMask2, sizeof(usSoldierFlagMask2), sizeof(UINT32), numBytesRead);
|
||||
|
||||
if ( guiCurrentSaveGameVersion >= INDIVIDUAL_MILITIA )
|
||||
{
|
||||
numBytesRead = ReadFieldByField( hFile, &this->usIndividualMilitiaID, sizeof(usIndividualMilitiaID), sizeof(UINT32), numBytesRead );
|
||||
}
|
||||
else
|
||||
{
|
||||
this->usIndividualMilitiaID = 0;
|
||||
|
||||
for ( int i = 0; i < sizeof(usIndividualMilitiaID); ++i )
|
||||
buffer++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2457,6 +2445,18 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
buffer++;
|
||||
}
|
||||
|
||||
if ( guiCurrentSaveGameVersion >= INDIVIDUAL_MILITIA )
|
||||
{
|
||||
numBytesRead = ReadFieldByField( hFile, &this->usIndividualMilitiaID, sizeof( usIndividualMilitiaID ), sizeof( UINT32 ), numBytesRead );
|
||||
}
|
||||
else
|
||||
{
|
||||
this->usIndividualMilitiaID = 0;
|
||||
|
||||
for ( int i = 0; i < sizeof( usIndividualMilitiaID ); ++i )
|
||||
buffer++;
|
||||
}
|
||||
|
||||
if ( guiCurrentSaveGameVersion >= DISABILITYFLAGMASK )
|
||||
{
|
||||
numBytesRead = ReadFieldByField( hFile, &this->usDisabilityFlagMask, sizeof( usDisabilityFlagMask ), sizeof( UINT32 ), numBytesRead );
|
||||
@@ -2469,6 +2469,18 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
buffer++;
|
||||
}
|
||||
|
||||
if ( guiCurrentSaveGameVersion >= DRAGSTRUCTURE )
|
||||
{
|
||||
numBytesRead = ReadFieldByField( hFile, &this->sDragGridNo, sizeof( sDragGridNo ), sizeof( INT32 ), numBytesRead );
|
||||
}
|
||||
else
|
||||
{
|
||||
this->sDragGridNo = NOWHERE;
|
||||
|
||||
for ( int i = 0; i < sizeof( sDragGridNo ); ++i )
|
||||
buffer++;
|
||||
}
|
||||
|
||||
/*if ( guiCurrentSaveGameVersion >= FOOD_CHANGES )
|
||||
{
|
||||
numBytesRead = ReadFieldByField(hFile, &this->bFoodLevel, sizeof(bFoodLevel), sizeof(INT32), numBytesRead);
|
||||
|
||||
Reference in New Issue
Block a user