Core.Object | +--Engine.Actor | +--Engine.Inventory | +--Engine.Weapon | +--XIII.XIIIWeapon | +--XIII.Bazook
string
GetAmmoText(out int)
//_____________________________________________________________________________ // ELR Text to be displayed in HUD
bool
HasAltAmmo()
//_____________________________________________________________________________
float
RateSelf()
//_____________________________________________________________________________ // FRD
00001 //----------------------------------------------------------- 00002 // 00003 //----------------------------------------------------------- 00004 class Bazook extends XIIIWeapon; 00005 00006 //_____________________________________________________________________________ 00007 simulated function bool HasAltAmmo() 00008 { // because we can stun only if we have ammo (bAllowEmptyShot=false, must down weapon after last fire) 00009 return HasAmmo(); 00010 } 00011 00012 //_____________________________________________________________________________ 00013 // ELR Text to be displayed in HUD 00014 simulated function string GetAmmoText(out int bDrawbulletIcon) 00015 { 00016 local string AmmoText,AltAmmoText; 00017 00018 bDrawbulletIcon = 1; 00019 00020 // Setup ammotext 00021 AmmoText = string(Ammotype.AmmoAmount); 00022 return AmmoText; 00023 } 00024 00025 //_____________________________________________________________________________ 00026 state Idle 00027 { 00028 simulated function ForceReload() 00029 { // ELR check here that we have enough ammo to reload 00030 00031 Log(" ForceReload Call in Idle"); 00032 if ( ReLoadCount == 0 ) 00033 { 00034 ServerForceReload(); 00035 if ( HasAmmo() ) 00036 GotoState('Reloading'); 00037 } 00038 } 00039 } 00040 00041 //_____________________________________________________________________________ 00042 simulated function PlayIdleAnim() 00043 { 00044 if ( ReLoadCount > 0 ) 00045 { 00046 if ( bHaveBoredSfx && Pawn(Owner).IsPlayerPawn() && (iBoredCount > BOREDSFXTHRESHOLD) ) 00047 { 00048 iBoredCount = 0; 00049 if ( Instigator.IsLocallyControlled() || (Level.NetMode == NM_StandAlone) ) 00050 Instigator.PlayRolloffSound(hActWaitSound, self, 0, int(Pawn(Owner).IsPlayerPawn()), 0 ); 00051 PlayAnim('WaitAct', 1.0, 0.3); 00052 } 00053 else 00054 PlayAnim('Wait', 1.0, 0.3); 00055 } 00056 else 00057 { 00058 if ( bHaveBoredSfx && Pawn(Owner).IsPlayerPawn() && (iBoredCount > BOREDSFXTHRESHOLD) ) 00059 { 00060 iBoredCount = 0; 00061 if ( Instigator.IsLocallyControlled() || (Level.NetMode == NM_StandAlone) ) 00062 Instigator.PlayRolloffSound(hActWaitSound, self, 0, int(Pawn(Owner).IsPlayerPawn()), 0 ); 00063 PlayAnim('WaitActVide', 1.0, 0.3); 00064 } 00065 else 00066 PlayAnim('WaitVide', 1.0, 0.3); 00067 } 00068 } 00069 00070 //_____________________________________________________________________________ 00071 simulated function TweenDown() 00072 { 00073 if ( ReLoadCount > 0 ) 00074 PlayAnim('Down', 1.1); 00075 else 00076 PlayAnim('DownVide', 1.0); 00077 } 00078 00079 //_____________________________________________________________________________ 00080 simulated function PlaySelect() 00081 { 00082 if (ReLoadCount > 0) 00083 PlayAnim('Select', 1.0); 00084 else 00085 PlayAnim('SelectVide', 1.0); 00086 if ( Instigator.IsLocallyControlled() || (Level.NetMode == NM_StandAlone) ) 00087 Instigator.PlayRolloffSound(hSelectWeaponSound, self, 0, int(Pawn(Owner).IsPlayerPawn()) ); 00088 } 00089 00090 //_____________________________________________________________________________ 00091 // FRD 00092 function float RateSelf() 00093 { 00094 local float distance; 00095 00096 if ( !HasAmmo() ) 00097 return -2; 00098 if (instigator.controller.enemy!=none) 00099 { 00100 distance=Vsize(instigator.controller.enemy.location-instigator.location); 00101 if (distance<733) 00102 return 0.26; 00103 } 00104 return AIRating; 00105 } 00106 00107 // Icon=texture'XIIIMenu.BazookaIcon' 00108 00109 defaultproperties 00110 { 00111 WeaponOnoClass=Class'XIDSpec.BazookWeaponOno' 00112 bHaveAltFire=True 00113 bAllowEmptyShot=False 00114 bAutoReload=True 00115 bHeavyWeapon=True 00116 bHaveBoredSfx=True 00117 WHand=WHA_2HShot 00118 WeaponMode=WM_SemiAuto 00119 AmmoName=Class'XIII.BazookAmmo' 00120 AltAmmoName=Class'XIII.BazookRocketAltAmmo' 00121 PickupAmmoCount=1 00122 ReloadCount=1 00123 MeshName="XIIIArmes.FpsBazookaM" 00124 FireOffset=(X=9.000000,Y=15.000000,Z=1.000000) 00125 AltFireOffset=(X=7.000000,Y=-1.000000,Z=-6.000000) 00126 CrossHair=Texture'XIIIMenu.HUD.MireBazooka' 00127 ShotTime=1.000000 00128 FiringMode="FM_Bazook" 00129 FireNoise=0.787000 00130 ReLoadNoise=0.000000 00131 AltFireNoise=0.000000 00132 LoadedFiringAnim="Firevide" 00133 EmptyFiringAnim="firevide_b" 00134 LoadedAltFiringAnim="FireAlt" 00135 ViewFeedBack=(X=5.000000,Y=12.000000) 00136 RumbleFXNum=13 00137 ShakeMag=900.000000 00138 shaketime=7.000000 00139 ShakeVert=(X=5.000000,Y=10.000000,Z=-25.000000) 00140 ShakeCycles=2.000000 00141 AIRating=0.800000 00142 TraceDist=150.000000 00143 hFireSound=Sound'XIIIsound.Guns__BazFire.BazFire__hBazFire' 00144 hReloadSound=Sound'XIIIsound.Guns__BazRel.BazRel__hBazRel' 00145 hNoAmmoSound=Sound'XIIIsound.Guns__BazDryFire.BazDryFire__hBazDry' 00146 hSelectWeaponSound=Sound'XIIIsound.Guns__BazSelWp.BazSelWp__hBazSelWp' 00147 hAltFireSound=Sound'XIIIsound.Guns__BazFireAlt.BazFireAlt__hBazFireAlt' 00148 hActWaitSound=Sound'XIIIsound.Guns__BazWait.BazWait__hBazWait' 00149 InventoryGroup=15 00150 PickupClassName="XIII.BazookPick" 00151 PlayerViewOffset=(X=3.000000,Y=7.000000,Z=-4.500000) 00152 ThirdPersonRelativeLocation=(X=11.000000,Y=-3.000000,Z=7.000000) 00153 AttachmentClass=Class'XIII.BazookAttach' 00154 ItemName="Bazooka" 00155 DrawScale=0.300000 00156 }