mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- bug fix: invisible enemies
- bug fix: manual reload for two weapons - bug fix: barrel extender falls off while none is attached git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@382 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+32
-3
@@ -2922,9 +2922,9 @@ INT8 FindAmmoToReload( SOLDIERTYPE * pSoldier, INT8 bWeaponIn, INT8 bExcludeSlot
|
||||
|
||||
BOOLEAN AutoReload( SOLDIERTYPE * pSoldier )
|
||||
{
|
||||
OBJECTTYPE * pObj;
|
||||
INT8 bSlot, bAPCost;
|
||||
BOOLEAN fRet;
|
||||
OBJECTTYPE *pObj, *pObj2;
|
||||
INT8 bSlot, bAPCost;
|
||||
BOOLEAN fRet;
|
||||
|
||||
CHECKF( pSoldier );
|
||||
pObj = &(pSoldier->inv[HANDPOS]);
|
||||
@@ -2938,8 +2938,37 @@ BOOLEAN AutoReload( SOLDIERTYPE * pSoldier )
|
||||
|
||||
PlayJA2Sample( Weapon[ Item[pObj->usItem].ubClassIndex ].ManualReloadSound, RATE_11025, SoundVolume( HIGHVOLUME, pSoldier->sGridNo ), 1, SoundDir( pSoldier->sGridNo ) );
|
||||
|
||||
if ( IsValidSecondHandShot( pSoldier ) )
|
||||
{
|
||||
pObj2 = &(pSoldier->inv[SECONDHANDPOS]);
|
||||
|
||||
if (pObj2->ubGunShotsLeft && !(pObj2->ubGunState & GS_CARTRIDGE_IN_CHAMBER) )
|
||||
{
|
||||
pObj2->ubGunState |= GS_CARTRIDGE_IN_CHAMBER;
|
||||
PlayJA2Sample( Weapon[ Item[pObj2->usItem].ubClassIndex ].ManualReloadSound, RATE_11025, SoundVolume( HIGHVOLUME, pSoldier->sGridNo ), 1, SoundDir( pSoldier->sGridNo ) );
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( IsValidSecondHandShot( pSoldier ) )
|
||||
{
|
||||
pObj2 = &(pSoldier->inv[SECONDHANDPOS]);
|
||||
|
||||
if (pObj2->ubGunShotsLeft && !(pObj2->ubGunState & GS_CARTRIDGE_IN_CHAMBER) )
|
||||
{
|
||||
pObj2->ubGunState |= GS_CARTRIDGE_IN_CHAMBER;
|
||||
|
||||
DeductPoints(pSoldier, Weapon[Item[(pObj2)->usItem].ubClassIndex].APsToReloadManually, 0);
|
||||
|
||||
PlayJA2Sample( Weapon[ Item[pObj2->usItem].ubClassIndex ].ManualReloadSound, RATE_11025, SoundVolume( HIGHVOLUME, pSoldier->sGridNo ), 1, SoundDir( pSoldier->sGridNo ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
//</SB>
|
||||
|
||||
if (Item[pObj->usItem].usItemClass == IC_GUN || Item[pObj->usItem].usItemClass == IC_LAUNCHER)
|
||||
|
||||
Reference in New Issue
Block a user