Ges
Posted: Thu Jan 21, 2010 3:25 pm
This *should* fix altfire loading sound not looping with AlAudio/FMod.
GESBioRifle.uc
Sound volume may be wrong I don't know.
GESBioRifle.uc
Code: Select all
state AltFiring
{
function Tick( float DeltaTime )
{
ChargeSize += DeltaTime;
if ( (pawn(Owner).bAltFire==0))
GoToState('ShootLoad');
Count += DeltaTime;
if (Count > 1.0)
{
Count = 0.0;
if ( (PlayerPawn(Owner) == None) && (FRand() < 0.3) )
GoToState('ShootLoad');
else if (!AmmoType.UseAmmo(1))
GoToState('ShootLoad');
}
if(Pawn(Owner).bAltFire == 0)
AmbientSound = None;
}
function EndState()
{
AmbientSound = None;
}
Begin:
ChargeSize = 0.0;
Count = 0.0;
AmbientSound = Misc1Sound;
SoundVolume = SoundVolume*SoundDampening;
PlayAnim('Charging',0.2,0.05);
FinishAnim();
GotoState('ShootLoad');
}