mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
The new <BarrelConfiguration>-tag specifies how many bullets a gun shoots at once. Several values can be used. If no value is set, 1 will be used.
Toggling fire modes cycles between barrel configurations if several have been set. Requires GameDir >= r2461 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8652 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+18
-5
@@ -2348,7 +2348,10 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
{
|
||||
numBytesRead = ReadFieldByField( hFile, &this->sDiseasePoints, sizeof(sDiseasePoints), sizeof(INT32), numBytesRead );
|
||||
numBytesRead = ReadFieldByField( hFile, &this->sDiseaseFlag, sizeof(sDiseaseFlag), sizeof(UINT8), numBytesRead );
|
||||
numBytesRead = ReadFieldByField( hFile, &this->ubFiller, sizeof(ubFiller), sizeof(UINT8), numBytesRead );
|
||||
numBytesRead = ReadFieldByField( hFile, &this->ubFiller, sizeof( ubFiller ), sizeof( UINT8 ), numBytesRead );
|
||||
numBytesRead = ReadFieldByField( hFile, &this->ubFiller1, sizeof( ubFiller1 ), sizeof( UINT8 ), numBytesRead );
|
||||
numBytesRead = ReadFieldByField( hFile, &this->usBarrelMode, sizeof( usBarrelMode ), sizeof( UINT8 ), numBytesRead );
|
||||
numBytesRead = ReadFieldByField( hFile, &this->usBarrelCounter, sizeof( usBarrelCounter ), sizeof( UINT8 ), numBytesRead );
|
||||
numBytesRead = ReadFieldByField( hFile, &this->sFocusGridNo, sizeof(sFocusGridNo), sizeof(INT32), numBytesRead );
|
||||
}
|
||||
else
|
||||
@@ -2363,11 +2366,16 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
this->sDiseasePoints[i] = 0;
|
||||
this->sDiseaseFlag[i] = 0;
|
||||
}
|
||||
|
||||
buffer += sizeof(sFocusGridNo);
|
||||
while ( (buffer % 4) > 0 ) ++buffer;
|
||||
|
||||
|
||||
numBytesRead = ReadFieldByField( hFile, &this->ubFiller, sizeof(ubFiller), sizeof(UINT8), numBytesRead );
|
||||
|
||||
buffer += sizeof( ubFiller1 );
|
||||
buffer += sizeof( usBarrelMode );
|
||||
buffer += sizeof( usBarrelCounter );
|
||||
while ( ( buffer % 4 ) > 0 ) ++buffer;
|
||||
|
||||
buffer += sizeof( sFocusGridNo );
|
||||
while ( ( buffer % 4 ) > 0 ) ++buffer;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2408,6 +2416,11 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
while((buffer%4) > 0)
|
||||
buffer++;
|
||||
|
||||
buffer += sizeof( ubFiller1 );
|
||||
buffer += sizeof( usBarrelMode );
|
||||
buffer += sizeof( usBarrelCounter );
|
||||
while ( ( buffer % 4 ) > 0 ) ++buffer;
|
||||
|
||||
for ( int i = 0; i < sizeof(sFocusGridNo); ++i )
|
||||
buffer++;
|
||||
while ( (buffer % 4) > 0 )
|
||||
|
||||
Reference in New Issue
Block a user