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 |
/** * Copyright 1998-2007 Epic Games, Inc. All Rights Reserved. */ class UTEmit_LeviathanExplosion extends UTReplicatedEmitter; var float Damage; var float DamageRadius; var float MomentumTransfer; var Class<DamageType> MyDamageType; var class<UTExplosionLight> ExplosionLightClass; var Controller InstigatorController; var CameraAnim ExplosionShake; simulated function PostBeginPlay() { local UTPlayerController PC; local float Dist, Scale; Super.PostBeginPlay(); if ( WorldInfo.NetMode != NM_DedicatedServer && !WorldInfo.bDropDetail ) { AttachComponent(new(Outer) ExplosionLightClass); } foreach LocalPlayerControllers(class'UTPlayerController', PC) { if (PC.ViewTarget != None) { Dist = VSize(Location - PC.ViewTarget.Location); if (Dist < DamageRadius * 2.0) { if (Dist < DamageRadius) { Scale = 1.0; } else { Scale = (DamageRadius * 2.0 - Dist) / DamageRadius; } PC.PlayCameraAnim(ExplosionShake, Scale); } } } } /** special version of HurtRadius() for the Redeemer that works better with the giant radius by tracing to edges * of large objects instead of just the center * static so that it can be shared with UTRemoteRedeemer */ function RedeemerHurtRadius(float RadiusFactor, Controller InstigatedByController) { local Actor Victim, HitActor; local bool bCauseDamage; local float HurtRadius, Radius, Height; local vector Side, Up, ExplosionCenter, HitNormal, HitLocation; HurtRadius = default.DamageRadius * RadiusFactor; if (InstigatedByController == None && Instigator != None) { InstigatedByController = Instigator.Controller; } // move explosion center up a bit to address not hitting pawns ExplosionCenter = Location + vect(0,0,200); HitActor = Trace(HitLocation, HitNormal, ExplosionCenter, Location, true,,,TRACEFLAG_Blocking); ExplosionCenter = (HitActor == None) ? Location + vect(0,0,100) : 0.5 * (ExplosionCenter + HitLocation); foreach CollidingActors(class'Actor', Victim, HurtRadius, ExplosionCenter) { if (!Victim.bStatic && (Victim != self) ) { Victim.GetBoundingCylinder(Radius, Height); Up = vect(0,0,1) * Height; bCauseDamage = FastTrace(Victim.Location + Up, ExplosionCenter); if (!bCauseDamage) { bCauseDamage = FastTrace(Victim.Location , ExplosionCenter); if ( !bCauseDamage && (Radius > 100.0) ) { // try sides Side = (Normal(Victim.Location - ExplosionCenter) Cross vect(0,0,1)) * Radius; bCauseDamage = FastTrace(Victim.Location + Side + Up, ExplosionCenter) || FastTrace(Victim.Location - Side + Up, ExplosionCenter); } } if (bCauseDamage) { Victim.TakeRadiusDamage( InstigatedByController, Damage, HurtRadius, default.MyDamageType, default.MomentumTransfer, ExplosionCenter, false, self ); } } } } auto state Dying { Begin: RedeemerHurtRadius(0.125, InstigatorController); Sleep(0.5); RedeemerHurtRadius(0.3, InstigatorController); Sleep(0.2); RedeemerHurtRadius(0.475, InstigatorController); Sleep(0.2); RedeemerHurtRadius(0.650, InstigatorController); Sleep(0.2); RedeemerHurtRadius(0.825, InstigatorController); Sleep(0.2); RedeemerHurtRadius(1.0, InstigatorController); } defaultproperties { Damage=250.000000 DamageRadius=2000.000000 MomentumTransfer=250000.000000 MyDamageType=Class'UTGameContent.UTDmgType_LeviathanExplosion' ExplosionLightClass=Class'UTGame.UTHugeExplosionLight' ExplosionShake=CameraAnim'Camera_FX.Leviathan_Impact' EmitterTemplate=ParticleSystem'VH_Leviathan.Effects.P_VH_Leviathan_BigBeam_Explode' ServerLifeSpan=3.000000 Begin Object Class=ParticleSystemComponent Name=ParticleSystemComponent0 ObjName=ParticleSystemComponent0 Archetype=ParticleSystemComponent'UTGame.Default__UTReplicatedEmitter:ParticleSystemComponent0' ObjectArchetype=ParticleSystemComponent'UTGame.Default__UTReplicatedEmitter:ParticleSystemComponent0' End Object ParticleSystemComponent=ParticleSystemComponent0 Components(0)=ParticleSystemComponent0 Begin Object Class=AudioComponent Name=ExplosionAC ObjName=ExplosionAC Archetype=AudioComponent'Engine.Default__AudioComponent' SoundCue=SoundCue'A_Vehicle_leviathan.SoundCues.A_Vehicle_Leviathan_BigBang' bAutoPlay=True bAutoDestroy=True Name="ExplosionAC" ObjectArchetype=AudioComponent'Engine.Default__AudioComponent' End Object Components(1)=ExplosionAC TickGroup=TG_PreAsyncWork bGameRelevant=False LifeSpan=0.000000 Name="Default__UTEmit_LeviathanExplosion" ObjectArchetype=UTReplicatedEmitter'UTGame.Default__UTReplicatedEmitter' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |