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:
Flugente
2019-01-27 19:48:18 +00:00
parent 61553feb57
commit a5e5ff6bd8
15 changed files with 338 additions and 50 deletions
+8
View File
@@ -393,6 +393,10 @@ typedef struct
// this is intended for guns that normally don't possess burst mode, like revolvers
BOOLEAN fBurstOnlyByFanTheHammer;
// Flugente: multi-barrel weapons can fire a variety of barrels at once in all firemodes.
// This vector stores the possible configurations
std::vector<UINT8> barrelconfigurations;
} WEAPONTYPE;
typedef struct
{
@@ -537,4 +541,8 @@ FLOAT GetOverheatDamageThreshold( OBJECTTYPE *pObj );
BOOLEAN ArtilleryStrike( UINT16 usItem, UINT8 ubOwnerID, UINT32 usStartingGridNo, UINT32 usTargetMapPos );
// Flugente: functions for using several barrels at once
UINT8 GetNextBarrelMode( UINT16 usItem, UINT8 aBarrelMode );
UINT8 GetFittingBarrelMode( UINT16 usItem, UINT8 aBarrelMode ); // return a number of barrels this gun can fire, equal or below aBarrelMode
#endif