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 |
class ONSTankSecondaryTurret extends ONSWeapon; var class<Emitter> mTracerClass; var() editinline Emitter mTracer; var() float mTracerInterval; var() float mTracerPullback; var() float mTracerMinDistance; var() float mTracerSpeed; var float mLastTracerTime; static function StaticPrecache(LevelInfo L) { L.AddPrecacheMaterial(Material'VMparticleTextures.TankFiringP.CloudParticleOrangeBMPtex'); L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.TracerShot'); } simulated function UpdatePrecacheMaterials() { Level.AddPrecacheMaterial(Material'VMparticleTextures.TankFiringP.CloudParticleOrangeBMPtex'); Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.TracerShot'); Super.UpdatePrecacheMaterials(); } function byte BestMode() { return 0; } simulated function Destroyed() { if (mTracer != None) mTracer.Destroy(); Super.Destroyed(); } simulated function UpdateTracer() { local vector SpawnDir, SpawnVel; local float hitDist; if (Level.NetMode == NM_DedicatedServer) return; if (mTracer == None) { mTracer = Spawn(mTracerClass); } if (Level.bDropDetail || Level.DetailMode == DM_Low) mTracerInterval = 2 * Default.mTracerInterval; else mTracerInterval = Default.mTracerInterval; if (mTracer != None && Level.TimeSeconds > mLastTracerTime + mTracerInterval) { mTracer.SetLocation(WeaponFireLocation); hitDist = VSize(LastHitLocation - WeaponFireLocation) - mTracerPullback; if (Instigator != None && Instigator.IsLocallyControlled()) SpawnDir = vector(WeaponFireRotation); else SpawnDir = Normal(LastHitLocation - WeaponFireLocation); if(hitDist > mTracerMinDistance) { SpawnVel = SpawnDir * mTracerSpeed; mTracer.Emitters[0].StartVelocityRange.X.Min = SpawnVel.X; mTracer.Emitters[0].StartVelocityRange.X.Max = SpawnVel.X; mTracer.Emitters[0].StartVelocityRange.Y.Min = SpawnVel.Y; mTracer.Emitters[0].StartVelocityRange.Y.Max = SpawnVel.Y; mTracer.Emitters[0].StartVelocityRange.Z.Min = SpawnVel.Z; mTracer.Emitters[0].StartVelocityRange.Z.Max = SpawnVel.Z; mTracer.Emitters[0].LifetimeRange.Min = hitDist / mTracerSpeed; mTracer.Emitters[0].LifetimeRange.Max = mTracer.Emitters[0].LifetimeRange.Min; mTracer.SpawnParticle(1); } mLastTracerTime = Level.TimeSeconds; } } simulated function FlashMuzzleFlash() { Super.FlashMuzzleFlash(); if (Role < ROLE_Authority) DualFireOffset *= -1; UpdateTracer(); } defaultproperties { mTracerClass=Class'XEffects.NewTracer' mTracerInterval=0.060000 mTracerPullback=150.000000 mTracerSpeed=15000.000000 YawBone="Object01" PitchBone="Object02" PitchUpLimit=12500 PitchDownLimit=59500 WeaponFireAttachmentBone="Object02" WeaponFireOffset=85.000000 DualFireOffset=5.000000 RotationsPerSecond=2.000000 bInstantRotation=Wahr bInstantFire=Wahr bDoOffsetTrace=Wahr bAmbientFireSound=Wahr bIsRepeatingFF=Wahr Spread=0.010000 RedSkin=Shader'VMVehicles-TX.HoverTankGroup.HoverTankChassisFinalRED' BlueSkin=Shader'VMVehicles-TX.HoverTankGroup.HoverTankChassisFinalBLUE' FireInterval=0.100000 AmbientEffectEmitterClass=Class'Onslaught.ONSRVChainGunFireEffect' FireSoundClass=Sound'ONSVehicleSounds-S.Tank.TankMachineGun01' AmbientSoundScaling=1.300000 FireForce="minifireb" DamageType=Class'Onslaught.DamTypeONSChainGun' DamageMin=17 DamageMax=17 TraceRange=15000.000000 ShakeRotMag=(X=50.000000,Y=50.000000,Z=50.000000) ShakeRotRate=(X=10000.000000,Y=10000.000000,Z=10000.000000) ShakeRotTime=2.000000 ShakeOffsetMag=(X=1.000000,Y=1.000000,Z=1.000000) ShakeOffsetRate=(X=1000.000000,Y=1000.000000,Z=1000.000000) ShakeOffsetTime=2.000000 AIInfo(0)=(bInstantHit=Wahr,aimerror=750.000000) CullDistance=8000.000000 Mesh=SkeletalMesh'ONSWeapons-A.TankMachineGun' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |