mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Added weapon raising sound.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8733 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5602,6 +5602,59 @@ BOOLEAN SOLDIERTYPE::InternalSoldierReadyWeapon( UINT8 sFacingDir, BOOLEAN fEndR
|
|||||||
//}//
|
//}//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// weapon raising sound
|
||||||
|
if (fReturnVal &&
|
||||||
|
!fEndReady &&
|
||||||
|
this->bVisible >= 0 &&
|
||||||
|
!WeaponReady(this) &&
|
||||||
|
this->inv[HANDPOS].exists() &&
|
||||||
|
this->inv[HANDPOS].usItem &&
|
||||||
|
Item[this->inv[HANDPOS].usItem].usItemClass & IC_GUN)
|
||||||
|
{
|
||||||
|
CHAR8 zFilename[512];
|
||||||
|
sprintf(zFilename, "");
|
||||||
|
|
||||||
|
switch (Weapon[Item[this->inv[HANDPOS].usItem].ubClassIndex].ubWeaponType)
|
||||||
|
{
|
||||||
|
case GUN_PISTOL:
|
||||||
|
sprintf(zFilename, "sounds\\equip\\Draw_Pistol.ogg");
|
||||||
|
break;
|
||||||
|
case GUN_M_PISTOL:
|
||||||
|
sprintf(zFilename, "sounds\\equip\\Draw_MP.ogg");
|
||||||
|
break;
|
||||||
|
case GUN_SMG:
|
||||||
|
sprintf(zFilename, "sounds\\equip\\Draw_SMG.ogg");
|
||||||
|
break;
|
||||||
|
case GUN_RIFLE:
|
||||||
|
sprintf(zFilename, "sounds\\equip\\Draw_Rifle.ogg");
|
||||||
|
break;
|
||||||
|
case GUN_SN_RIFLE:
|
||||||
|
sprintf(zFilename, "sounds\\equip\\Draw_Sniper.ogg");
|
||||||
|
break;
|
||||||
|
case GUN_AS_RIFLE:
|
||||||
|
sprintf(zFilename, "sounds\\equip\\Draw_AR.ogg");
|
||||||
|
break;
|
||||||
|
case GUN_LMG:
|
||||||
|
sprintf(zFilename, "sounds\\equip\\Draw_LMG.ogg");
|
||||||
|
break;
|
||||||
|
case GUN_SHOTGUN:
|
||||||
|
sprintf(zFilename, "sounds\\equip\\Draw_Shotgun.ogg");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sprintf(zFilename, "sounds\\equip\\Draw.ogg");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!FileExists(zFilename))
|
||||||
|
{
|
||||||
|
sprintf(zFilename, "sounds\\equip\\Draw.ogg");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FileExists(zFilename))
|
||||||
|
{
|
||||||
|
PlayJA2SampleFromFile(zFilename, RATE_11025, SoundVolume(HIGHVOLUME, this->sGridNo), 1, SoundDir(this->sGridNo));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return(fReturnVal);
|
return(fReturnVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user