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
-1
@@ -1871,7 +1871,7 @@ INT8 TryToReload( SOLDIERTYPE * pSoldier )
|
||||
{
|
||||
INT8 bSlot;
|
||||
WEAPONTYPE *pWeapon;
|
||||
OBJECTTYPE *pObj;
|
||||
OBJECTTYPE *pObj, *pObj2;
|
||||
|
||||
pWeapon = &(Weapon[pSoldier->inv[HANDPOS].usItem]);
|
||||
bSlot = FindAmmo( pSoldier, pWeapon->ubCalibre, pWeapon->ubMagSize, NO_SLOT );
|
||||
@@ -1894,8 +1894,39 @@ INT8 TryToReload( SOLDIERTYPE * pSoldier )
|
||||
DeductPoints(pSoldier, Weapon[Item[(pObj)->usItem].ubClassIndex].APsToReloadManually, 0);
|
||||
|
||||
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 (bSlot != NO_SLOT && ReloadGun( pSoldier, &(pSoldier->inv[HANDPOS]), &(pSoldier->inv[bSlot]) ))
|
||||
|
||||
Reference in New Issue
Block a user