mGm_Lizard

mGmTransFire.uc

Jul 30th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class mGmTransFire extends TransFire
  2.                         config(mGmTrans);
  3.  
  4. var() Sound TransFireSound;
  5. var() Sound RecallFireSound;
  6. var() String TransFireForce;
  7. var() String RecallFireForce;
  8.  
  9. simulated function PlayFiring()
  10. {
  11.     if (!mGmTransLauncher(Weapon).bBeaconDeployed)
  12.     {
  13.         Weapon.PlayAnim(FireAnim, FireAnimRate, TweenTime);
  14.         ClientPlayForceFeedback( TransFireForce );  // jdf
  15.     }
  16. }
  17.  
  18. function Rotator AdjustAim(Vector Start, float InAimError)
  19. {
  20.     return Instigator.Controller.Rotation;
  21. }
  22.  
  23. simulated function bool AllowFire()
  24. {
  25.     return ( mGmTransLauncher(Weapon).AmmoChargeF >= 1.0 );
  26. }
  27.  
  28. function projectile SpawnProjectile(Vector Start, Rotator Dir)
  29. {
  30.     local mGmTransBeacon TransBeacon;
  31.  
  32.     if (mGmTransLauncher(Weapon).TransBeacon == None)
  33.     {
  34.         if ( (Instigator == None) || (Instigator.PlayerReplicationInfo == None) || (Instigator.PlayerReplicationInfo.Team == None) )
  35.             TransBeacon = Weapon.Spawn(class'mGmTrans.mGnTransBeacon',,, Start, Dir);
  36.         else if ( Instigator.PlayerReplicationInfo.Team.TeamIndex == 0 )
  37.             TransBeacon = Weapon.Spawn(class'mGmTrans.mGmRedBeacon',,, Start, Dir);
  38.         else
  39.             TransBeacon = Weapon.Spawn(class'mGmTrans.mGmBlueBeacon',,, Start, Dir);
  40.   else
  41.             TransBeacon = Weapon.Spawn(class'mGmTrans.mGmNoBeacon',,, Start, Dir);
  42.         mGmTransLauncher(Weapon).TransBeacon = TransBeacon;
  43.         Weapon.PlaySound(TransFireSound,SLOT_Interact,,,,,false);
  44.     }
  45.     else
  46.     {
  47.         mGmTransLauncher(Weapon).ViewPlayer();
  48.         if ( mGmTransLauncher(Weapon).TransBeacon.Disrupted() )
  49.         {
  50.             if( (Instigator != None) && (PlayerController(Instigator.Controller) != None) )
  51.                 PlayerController(Instigator.Controller).ClientPlaySound(Sound'WeaponSounds.BSeekLost1');
  52.         }
  53.         else
  54.         {
  55.             DasTransLauncher(Weapon).TransBeacon.Destroy();
  56.             DasTransLauncher(Weapon).TransBeacon = None;
  57.             Weapon.PlaySound(RecallFireSound,SLOT_Interact,,,,,false);
  58.         }
  59.     }
  60.     return TransBeacon;
  61. }
  62.  
  63. defaultproperties
  64. {
  65.     AmmoClass=None
  66.     AmmoPerFire=1
  67.     FireAnimRate=1.5
  68.  
  69.     ProjectileClass=class'DasTrans.DasTransBeacon'
  70.  
  71.     ProjSpawnOffset=(X=25,Y=8,Z=-10)
  72.     FireRate=0.25
  73.     bWaitForRelease=true
  74.     bModeExclusive=false
  75.     FireSound=None
  76.     TransFireSound=Sound'WeaponSounds.Translocator.TranslocatorFire'
  77.     RecallFireSound=Sound'WeaponSounds.Translocator.TranslocatorModuleRegeneration'
  78.     TransFireForce="TranslocatorFire"  // jdf
  79.     RecallFireForce="TranslocatorModuleRegeneration"  // jdf
  80.  
  81.     BotRefireRate=0.3
  82.     bLeadTarget=false
  83. }
Advertisement
Add Comment
Please, Sign In to add comment