mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +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:
@@ -4191,10 +4191,16 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
}
|
||||
}
|
||||
|
||||
if ( pSoldier && pObject == &(pSoldier->inv[HANDPOS] ) && pSoldier->bWeaponMode != WM_NORMAL && Item[pSoldier->inv[HANDPOS].usItem].usItemClass & IC_GUN )
|
||||
if ( pSoldier && pObject == &(pSoldier->inv[HANDPOS] ) && Item[pSoldier->inv[HANDPOS].usItem].usItemClass & (IC_GUN|IC_LAUNCHER) )
|
||||
{
|
||||
sNewY = sY + 13; // rather arbitrary
|
||||
if ( pSoldier->bWeaponMode == WM_BURST )
|
||||
|
||||
if ( pSoldier->bWeaponMode == WM_NORMAL )
|
||||
{
|
||||
swprintf( pStr, L"" );
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
else if ( pSoldier->bWeaponMode == WM_BURST )
|
||||
{
|
||||
swprintf( pStr, New113Message[MSG113_BRST] );
|
||||
SetFontForeground( FONT_RED );
|
||||
@@ -4239,9 +4245,15 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
swprintf( pStr, New113Message[MSG113_BAYONET] );
|
||||
SetFontForeground( FONT_ORANGE );
|
||||
}
|
||||
|
||||
// Flugente: display barrel mode if necessary
|
||||
if ( pSoldier->usBarrelMode > 1 )
|
||||
swprintf( pStr2, L"%s x%d", pStr, pSoldier->usBarrelMode );
|
||||
else
|
||||
swprintf( pStr2, L"%s", pStr );
|
||||
|
||||
// Get length of string
|
||||
uiStringLength=StringPixLength(pStr, ITEM_FONT );
|
||||
uiStringLength=StringPixLength( pStr2, ITEM_FONT );
|
||||
|
||||
sNewX = sX + sWidth - uiStringLength - 4;
|
||||
|
||||
@@ -4249,10 +4261,11 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
{
|
||||
RestoreExternBackgroundRect( sNewX, sNewY, 15, 15 );
|
||||
}
|
||||
mprintf( sNewX, sNewY, pStr );
|
||||
gprintfinvalidate( sNewX, sNewY, pStr );
|
||||
|
||||
mprintf( sNewX, sNewY, pStr2 );
|
||||
gprintfinvalidate( sNewX, sNewY, pStr2 );
|
||||
}
|
||||
|
||||
// SANDRO - display BRST/AUTO on the second weapon too, if we are going to fire dual bursts
|
||||
if ( pSoldier && pObject == &(pSoldier->inv[SECONDHANDPOS] ) &&
|
||||
(pSoldier->bWeaponMode == WM_BURST || pSoldier->bWeaponMode == WM_AUTOFIRE) &&
|
||||
|
||||
Reference in New Issue
Block a user