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 |
//----------------------------------------------------------- // //----------------------------------------------------------- class ONSShockTankProjectile extends ShockProjectile; var ONSShockBall ONSShockBallEffect; simulated function PostBeginPlay() { Super(Projectile).PostBeginPlay(); if ( Level.NetMode != NM_DedicatedServer ) { ONSShockBallEffect = Spawn(class'ONSShockBall', self); ONSShockBallEffect.SetBase(self); } Velocity = Speed * Vector(Rotation); // starts off slower so combo can be done closer tempStartLoc = Location; } simulated function Destroyed() { if (ONSShockBallEffect != None) { if ( bNoFX ) ONSShockBallEffect.Destroy(); else ONSShockBallEffect.Kill(); } Super.Destroyed(); } simulated function DestroyTrails() { if (ONSShockBallEffect != None) ONSShockBallEffect.Destroy(); } simulated function ProcessTouch (Actor Other, vector HitLocation) { if (Owner != None && ONSShockTankCannon(Owner) != None && Other == ONSShockTankCannon(Owner).ShockShield) ProximityExplode(); else Super.ProcessTouch(Other, HitLocation); } simulated singular function HitWall(vector HitNormal, actor Wall) { local PlayerController PC; if (Owner != None && ONSShockTankCannon(Owner) != None && Wall == ONSShockTankCannon(Owner).ShockShield) ProximityExplode(); else { if ( Role == ROLE_Authority ) { if ( !Wall.bStatic && !Wall.bWorldGeometry ) { if ( Instigator == None || Instigator.Controller == None ) Wall.SetDelayedDamageInstigatorController( InstigatorController ); Wall.TakeDamage( Damage, instigator, Location, MomentumTransfer * Normal(Velocity), MyDamageType); if (DamageRadius > 0 && Vehicle(Wall) != None && Vehicle(Wall).Health > 0) Vehicle(Wall).DriverRadiusDamage(Damage, DamageRadius, InstigatorController, MyDamageType, MomentumTransfer, Location); HurtWall = Wall; } MakeNoise(1.0); } Explode(Location + ExploWallOut * HitNormal, HitNormal); if ( (ExplosionDecal != None) && (Level.NetMode != NM_DedicatedServer) ) { if ( ExplosionDecal.Default.CullDistance != 0 ) { PC = Level.GetLocalPlayerController(); if ( !PC.BeyondViewDistance(Location, ExplosionDecal.Default.CullDistance) ) Spawn(ExplosionDecal,self,,Location, rotator(-HitNormal)); else if ( (Instigator != None) && (PC == Instigator.Controller) && !PC.BeyondViewDistance(Location, 2*ExplosionDecal.Default.CullDistance) ) Spawn(ExplosionDecal,self,,Location, rotator(-HitNormal)); } else Spawn(ExplosionDecal,self,,Location, rotator(-HitNormal)); } HurtWall = None; } } simulated function Explode(vector HitLocation,vector HitNormal) { SuperExplosion(); } function ProximityExplode() { PlaySound(ComboSound, SLOT_None,1.0,,800); ONSShockTankCannon(Owner).ProximityExplosion(); Destroy(); } function SuperExplosion() { local actor HitActor; local vector HitLocation, HitNormal; HurtRadius(ComboDamage, ComboRadius, class'DamTypeShockTankShockBall', ComboMomentumTransfer, Location ); Spawn(class'ONSShockTankShockExplosion'); if ( (Level.NetMode != NM_DedicatedServer) && EffectIsRelevant(Location,false) ) { HitActor = Trace(HitLocation, HitNormal,Location - Vect(0,0,120), Location,false); if ( HitActor != None ) Spawn(class'ComboDecal',self,,HitLocation, rotator(vect(0,0,-1))); } PlaySound(ComboSound, SLOT_None,1.0,,800); DestroyTrails(); Destroy(); } defaultproperties { ComboSound=Sound'ONSBPSounds.ShockTank.ShockBallExplosion' ComboRadius=450.000000 ComboMomentumTransfer=235000.000000 Speed=9000.000000 MaxSpeed=9000.000000 Damage=150.000000 DamageRadius=250.000000 DrawType=DT_None AmbientSound=Sound'ONSBPSounds.ShockTank.ShockBallAmbient' Texture=None DrawScale=3.000000 Skins(0)=None CollisionRadius=0.000000 CollisionHeight=0.000000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |