Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 |
//============================================================================= // AA12 Automatic Shotgun Inventory class //============================================================================= class AA12AutoShotgun extends KFWeapon; // Use alt fire to switch fire modes simulated function AltFire(float F) { if(ReadyToFire(0)) { DoToggle(); } } exec function SwitchModes() { DoToggle(); } simulated function WeaponTick(float dt) { local float LastSeenSeconds,ReloadMulti; if( bForceLeaveIronsights ) { ZoomOut(true); if( Role < ROLE_Authority) ServerZoomOut(false); bForceLeaveIronsights = false; } if( ForceZoomOutTime > 0 ) { if( bAimingRifle ) { if( Level.TimeSeconds - ForceZoomOutTime > 0 ) { ForceZoomOutTime = 0; ZoomOut(true); if( Role < ROLE_Authority) ServerZoomOut(false); } } else { ForceZoomOutTime = 0; } } if ( (Level.NetMode == NM_Client) || Instigator == None || KFFriendlyAI(Instigator.Controller) == none && Instigator.PlayerReplicationInfo == None) return; // Turn it off on death / battery expenditure if (FlashLight != none) { // Keep the 1Pweapon client beam up to date. AdjustLightGraphic(); if (FlashLight.bHasLight) { if (Instigator.Health <= 0 || KFHumanPawn(Instigator).TorchBatteryLife <= 0 || Instigator.PendingWeapon != none ) { //Log("Killing Light...you're out of batteries, or switched / dropped weapons"); KFHumanPawn(Instigator).bTorchOn = false; ServerSpawnLight(); } } } UpdateMagCapacity(Instigator.PlayerReplicationInfo); if(!bIsReloading) { if(!Instigator.IsHumanControlled()) { LastSeenSeconds = Level.TimeSeconds - Instigator.Controller.LastSeenTime; if(MagAmmoRemaining == 0 || ((LastSeenSeconds >= 5 || LastSeenSeconds > MagAmmoRemaining) && MagAmmoRemaining < MagCapacity)) ReloadMeNow(); } } else { if((Level.TimeSeconds - ReloadTimer) >= ReloadRate) { if(AmmoAmount(0) <= MagCapacity && !bHoldToReload) { MagAmmoRemaining = AmmoAmount(0); ActuallyFinishReloading(); } else { if ( KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo) != none && KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill != none ) { ReloadMulti = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill.Static.GetReloadSpeedModifier(KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo), self); } else { ReloadMulti = 1.0; } AddReloadedAmmo(); if( bHoldToReload ) { NumLoadedThisReload++; } if(MagAmmoRemaining < MagCapacity && MagAmmoRemaining < AmmoAmount(0) && bHoldToReload) ReloadTimer = Level.TimeSeconds; if(MagAmmoRemaining >= MagCapacity || MagAmmoRemaining >= AmmoAmount(0) || !bHoldToReload || bDoSingleReload) ActuallyFinishReloading(); else if( Level.NetMode!=NM_Client ) Instigator.SetAnimAction(WeaponReloadAnim); } } else if(bIsReloading && !bReloadEffectDone && Level.TimeSeconds - ReloadTimer >= ReloadRate / 2) { bReloadEffectDone = true; ClientReloadEffects(); } } } defaultproperties { MagCapacity=20 ReloadRate=3.133000 ReloadAnim="Reload" ReloadAnimRate=1.000000 WeaponReloadAnim="Reload_AA12" bHasAimingMode=True IdleAimAnim="Idle_Iron" StandardDisplayFOV=65.000000 bModeZeroCanDryFire=True TraderInfoTexture=Texture'KillingFloor2HUD.Trader_Weapon_Icons.Trader_AA12' bIsTier3Weapon=True MeshRef="KF_Weapons2_Trip.AA12_Trip" SkinRefs(0)="KF_Weapons2_Trip_T.Special.AA12_cmb" SelectSoundRef="KF_AA12Snd.AA12_Select" HudImageRef="KillingFloor2HUD.WeaponSelect.AA12_unselected" SelectedHudImageRef="KillingFloor2HUD.WeaponSelect.AA12" PlayerIronSightFOV=80.000000 ZoomedDisplayFOV=45.000000 FireModeClass(0)=Class'KFMod.AA12Fire' FireModeClass(1)=Class'KFMod.NoFire' PutDownAnim="PutDown" SelectForce="SwitchToAssaultRifle" AIRating=0.550000 CurrentRating=0.550000 bShowChargingBar=True Description="An advanced automatic shotgun. Fires steel ball shot in semi or full auto." EffectOffset=(X=100.000000,Y=25.000000,Z=-10.000000) DisplayFOV=65.000000 Priority=200 InventoryGroup=4 GroupOffset=10 PickupClass=Class'KFMod.AA12Pickup' PlayerViewOffset=(X=25.000000,Y=20.000000,Z=-2.000000) BobDamping=6.000000 AttachmentClass=Class'KFMod.AA12Attachment' IconCoords=(X1=245,Y1=39,X2=329,Y2=79) ItemName="AA12" TransientSoundVolume=1.250000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |