class SchlonzMinigunAltFire extends MinigunFire; var() float SlowFireLoopAnimRate; var() float FastFireLoopAnimRate; var() float SlowBarrelRotationsPerSec; var() float FastBarrelRotationsPerSec; state WindUp { function BeginState() { ClientPlayForceFeedback(WindingForce); // jdf } function EndState() { if (ThisModeNum == 0) { if (!Weapon.FireMode[1].bIsFiring) StopForceFeedback(WindingForce); } else { if (!Weapon.FireMode[0].bIsFiring) StopForceFeedback(WindingForce); } } function ModeTick(float dt) { FireTime += dt; RollSpeed = (FireTime/WindUpTime) * MaxRollSpeed; if ( !bIsFiring ) { GotoState('WindDown'); return; } if (RollSpeed >= MaxRollSpeed) { RollSpeed = MaxRollSpeed; FireTime = WindUpTime; Gun.UpdateRoll(dt, RollSpeed, ThisModeNum); GotoState('SlowFireLoop'); return; } Gun.UpdateRoll(dt, RollSpeed, ThisModeNum); } function StopFiring() { GotoState('WindDown'); } } state SlowFireLoop { function BeginState() { FireLoopAnimRate = SlowFireLoopAnimRate; BarrelRotationsPerSec = SlowBarrelRotationsPerSec; FiringSound = Sound'WeaponSounds.Minigun.minialtfireb'; FireTime = 0; NextFireTime = Level.TimeSeconds - 0.1; //fire now! PlayAmbientSound(FiringSound); ClientPlayForceFeedback(FiringForce); // jdf Gun.LoopAnim(FireLoopAnim, FireLoopAnimRate, TweenTime); Gun.SpawnShells(RoundsPerRotation*BarrelRotationsPerSec); } function StopFiring() { GotoState('WindDown'); } function EndState() { PlayAmbientSound(WindingSound); StopForceFeedback(FiringForce); // jdf Gun.LoopAnim(Gun.IdleAnim, Gun.IdleAnimRate, TweenTime); Gun.SpawnShells(0.f); } function ModeTick(float dt) { Super.ModeTick(dt); Gun.UpdateRoll(dt, RollSpeed, ThisModeNum); if ( !bIsFiring ) { GotoState('WindDown'); return; } FireTime += dt; if (FireTime >= 1.3) { GotoState('FireLoop'); return; } } } state FireLoop { function BeginState() { FireLoopAnimRate = FastFireLoopAnimRate; BarrelRotationsPerSec = FastBarrelRotationsPerSec; FiringSound = Sound'WeaponSounds.Minigun.minifireb'; NextFireTime = Level.TimeSeconds - 0.1; //fire now! PlayAmbientSound(FiringSound); ClientPlayForceFeedback(FiringForce); // jdf Gun.LoopAnim(FireLoopAnim, FireLoopAnimRate, TweenTime); Gun.SpawnShells(RoundsPerRotation*BarrelRotationsPerSec); } function StopFiring() { GotoState('WindDown'); } function EndState() { PlayAmbientSound(WindingSound); StopForceFeedback(FiringForce); // jdf Gun.LoopAnim(Gun.IdleAnim, Gun.IdleAnimRate, TweenTime); Gun.SpawnShells(0.f); } function ModeTick(float dt) { Super.ModeTick(dt); Gun.UpdateRoll(dt, RollSpeed, ThisModeNum); if ( !bIsFiring ) { GotoState('WindDown'); return; } } } defaultproperties { SlowFireLoopAnimRate=4.500000 FastFireLoopAnimRate=9.000000 SlowBarrelRotationsPerSec=1.540000 FastBarrelRotationsPerSec=2.500000 BarrelRotationsPerSec=2.500000 WindUpTime=0.000000 DamageMin=50 DamageMax=50 ShakeRotMag=(X=8.000000,Y=8.000000,Z=8.000000) Spread=0.095000 }