Core.Object | +--Engine.Actor | +--Engine.Projectile | +--Botpack.Razor2 | +--Botpack.Razor2Alt
simulated
PostBeginPlay()
void
BlowUp(vector HitLocation)
00001 //============================================================================= 00002 // RazorBladeAlt. 00003 //============================================================================= 00004 class Razor2Alt extends Razor2; 00005 00006 #exec AUDIO IMPORT FILE="Sounds\Ripper\RazorjackAltFire.WAV" NAME="RazorAlt" GROUP="Ripper" 00007 00008 simulated function PostBeginPlay() 00009 { 00010 Super.PostBeginPlay(); 00011 if ( Level.bDropDetail ) 00012 LightType = LT_None; 00013 } 00014 00015 auto state Flying 00016 { 00017 simulated function ProcessTouch (Actor Other, Vector HitLocation) 00018 { 00019 local RipperPulse s; 00020 00021 if ( Other != Instigator ) 00022 { 00023 if ( Role == ROLE_Authority ) 00024 { 00025 Other.TakeDamage(damage, instigator,HitLocation, 00026 (MomentumTransfer * Normal(Velocity)), MyDamageType ); 00027 } 00028 s = spawn(class'RipperPulse',,,HitLocation); 00029 s.RemoteRole = ROLE_None; 00030 MakeNoise(1.0); 00031 Destroy(); 00032 } 00033 } 00034 00035 simulated function HitWall (vector HitNormal, actor Wall) 00036 { 00037 Super(Projectile).HitWall( HitNormal, Wall ); 00038 } 00039 00040 simulated function Explode(vector HitLocation, vector HitNormal) 00041 { 00042 local RipperPulse s; 00043 00044 s = spawn(class'RipperPulse',,,HitLocation + HitNormal*16); 00045 s.RemoteRole = ROLE_None; 00046 BlowUp(HitLocation); 00047 00048 Destroy(); 00049 } 00050 00051 function BlowUp(vector HitLocation) 00052 { 00053 local actor Victims; 00054 local float damageScale, dist; 00055 local vector dir; 00056 00057 if( bHurtEntry ) 00058 return; 00059 00060 bHurtEntry = true; 00061 foreach VisibleCollidingActors( class 'Actor', Victims, 180, HitLocation ) 00062 { 00063 if( Victims != self ) 00064 { 00065 dir = Victims.Location - HitLocation; 00066 dist = FMax(1,VSize(dir)); 00067 dir = dir/dist; 00068 dir.Z = FMin(0.45, dir.Z); 00069 damageScale = 1 - FMax(0,(dist - Victims.CollisionRadius)/180); 00070 Victims.TakeDamage 00071 ( 00072 damageScale * Damage, 00073 Instigator, 00074 Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir, 00075 damageScale * MomentumTransfer * dir, 00076 MyDamageType 00077 ); 00078 } 00079 } 00080 bHurtEntry = false; 00081 MakeNoise(1.0); 00082 } 00083 } 00084 00085 defaultproperties 00086 { 00087 Damage=34.000000 00088 MomentumTransfer=87000 00089 MyDamageType=RipperAltDeath 00090 SpawnSound=Sound'Botpack.ripper.RazorAlt' 00091 ExplosionDecal=Class'Botpack.RipperMark' 00092 LightType=LT_Steady 00093 LightEffect=LE_NonIncidence 00094 LightBrightness=255 00095 LightHue=23 00096 LightRadius=3 00097 }