XIII
Class Arbalete

source: C:\XIII\XIII\Classes\arbalete.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Weapon
            |
            +--XIII.XIIIWeapon
               |
               +--XIII.Arbalete
Direct Known Subclasses:None

class Arbalete
extends XIII.XIIIWeapon

//----------------------------------------------------------- // //-----------------------------------------------------------

Function Summary
 
simulated
PlayIdleAnim()
     
//_____________________________________________________________________________
 
simulated
PlaySelect()
     
//_____________________________________________________________________________
 float RateSelf()
     
//_____________________________________________________________________________
// FRD
 bool ShouldDrawCrosshair(Canvas C)
     
//_____________________________________________________________________________
 
simulated
TweenDown()
     
//_____________________________________________________________________________



Source Code


00001	//-----------------------------------------------------------
00002	//
00003	//-----------------------------------------------------------
00004	class Arbalete extends XIIIWeapon;
00005	
00006	//_____________________________________________________________________________
00007	simulated function bool ShouldDrawCrosshair(Canvas C)
00008	{
00009	    return false;
00010	}
00011	
00012	//_____________________________________________________________________________
00013	simulated function PlayIdleAnim()
00014	{
00015	    if ( ReLoadCount > 0 )
00016	    {
00017	      if ( bHaveBoredSfx && Pawn(Owner).IsPlayerPawn() && (iBoredCount > BOREDSFXTHRESHOLD) )
00018	      {
00019	        iBoredCount = 0;
00020	        if ( Instigator.IsLocallyControlled() || (Level.NetMode == NM_StandAlone) )
00021	          Instigator.PlayRolloffSound(hActWaitSound, self, 0, int(Pawn(Owner).IsPlayerPawn()), 0 );
00022	        PlayAnim('WaitAct', 1.0, 0.3);
00023	      }
00024	      else
00025	        PlayAnim('Wait', 1.0, 0.3);
00026	    }
00027	    else
00028	    {
00029	      if ( bHaveBoredSfx && Pawn(Owner).IsPlayerPawn() && (iBoredCount > BOREDSFXTHRESHOLD) )
00030	      {
00031	        iBoredCount = 0;
00032	        if ( Instigator.IsLocallyControlled() || (Level.NetMode == NM_StandAlone) )
00033	          Instigator.PlayRolloffSound(hActWaitSound, self, 0, int(Pawn(Owner).IsPlayerPawn()), 0 );
00034	        PlayAnim('WaitActVide', 1.0, 0.3);
00035	      }
00036	      else
00037	        PlayAnim('WaitVide', 1.0, 0.3);
00038	    }
00039	}
00040	
00041	//_____________________________________________________________________________
00042	simulated function TweenDown()
00043	{
00044	    if ( ReLoadCount > 0 )
00045	      PlayAnim('Down', 1.0);
00046	    else
00047	      PlayAnim('DownVide', 1.0);
00048	}
00049	
00050	//_____________________________________________________________________________
00051	simulated function PlaySelect()
00052	{
00053	    if (ReLoadCount > 0)
00054	      PlayAnim('Select',1.0);
00055	    else
00056	      PlayAnim('SelectVide',1.0);
00057	    if ( Instigator.IsLocallyControlled() || (Level.NetMode == NM_StandAlone) )
00058	      Instigator.PlayRolloffSound(hSelectWeaponSound, self, 0, int(Pawn(Owner).IsPlayerPawn()) );
00059	}
00060	
00061	//_____________________________________________________________________________
00062	// FRD
00063	function float RateSelf()
00064	{
00065	    local float distance;
00066	
00067	    if ( !HasAmmo() )
00068	      return -2;
00069	    if (instigator.controller.enemy!=none)
00070	    {
00071	      distance=Vsize(instigator.controller.enemy.location-instigator.location);
00072	      if (distance>1666)
00073	        return 0.28;
00074	    }
00075	    return AIRating;
00076	}
00077	
00078	//    Icon=texture'XIIIMenu.ArbaleteIcon'
00079	
00080	defaultproperties
00081	{
00082	     WeaponOnoClass=Class'XIDSpec.CrossBowWeaponOno'
00083	     bHaveScope=True
00084	     bAutoReload=True
00085	     bHaveBoredSfx=True
00086	     WHand=WHA_2HShot
00087	     WeaponMode=WM_SemiAuto
00088	     AmmoName=Class'XIII.BoltAmmo'
00089	     PickupAmmoCount=3
00090	     ReloadCount=1
00091	     MeshName="XIIIArmes.FpsArbaleteM"
00092	     FireOffset=(Y=10.000000,Z=-6.000000)
00093	     ShotTime=0.300000
00094	     FiringMode="FM_2H"
00095	     FireNoise=0.104000
00096	     ReLoadNoise=0.000000
00097	     ZCrosshair=Texture'XIIIMenu.HUD.ZMireSniperA'
00098	     ZCrosshairDot=Texture'XIIIMenu.HUD.miresnipeM'
00099	     LoadedFiringAnim="Firevide"
00100	     EmptyFiringAnim="firevide_b"
00101	     fAltZoomValue(1)=0.902000
00102	     RumbleFXNum=14
00103	     AIRating=0.391000
00104	     hFireSound=Sound'XIIIsound.Guns__ArbaFire.ArbaFire__hArbaFire'
00105	     hReloadSound=Sound'XIIIsound.Guns__ArbaRel.ArbaRel__hArbaRel'
00106	     hNoAmmoSound=Sound'XIIIsound.Guns__ArbaDryFire.ArbaDryFire__hArbaDry'
00107	     hSelectWeaponSound=Sound'XIIIsound.Guns__ArbaSelWp.ArbaSelWp__hArbaSelWp'
00108	     hZoomSound=Sound'XIIIsound.Guns__Zoom.Zoom__hZoom'
00109	     hActWaitSound=Sound'XIIIsound.Guns__ArbaWait.ArbaWait__hArbaWait'
00110	     InventoryGroup=6
00111	     PickupClassName="XIII.ArbaletePick"
00112	     PlayerViewOffset=(X=3.000000,Y=10.000000,Z=-6.000000)
00113	     ThirdPersonRelativeLocation=(X=21.000000,Y=-3.000000,Z=14.000000)
00114	     ThirdPersonRelativeRotation=(Pitch=7000)
00115	     AttachmentClass=Class'XIII.ArbaleteAttach'
00116	     ItemName="Crossbow"
00117	     DrawScale=0.300000
00118	}

End Source Code