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 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 00247 00248 00249 00250 00251 00252 00253 00254 00255 00256 00257 00258 00259 00260 00261 00262 00263 00264 00265 00266 00267 00268 00269 00270 00271 00272 00273 00274 00275 00276 00277 00278 00279 00280 00281 00282 00283 00284 00285 00286 00287 00288 00289 00290 00291 00292 00293 00294 00295 00296 00297 00298 00299 00300 00301 00302 00303 00304 00305 00306 00307 00308 00309 00310 00311 00312 00313 00314 00315 00316 00317 00318 00319 00320 00321 00322 00323 00324 00325 00326 00327 00328 00329 00330 00331 00332 00333 00334 00335 00336 00337 00338 00339 00340 00341 00342 00343 00344 00345 00346 00347 00348 00349 00350 00351 00352 00353 00354 00355 00356 00357 00358 00359 00360 00361 00362 00363 00364 00365 00366 00367 00368 00369 00370 00371 00372 00373 00374 00375 00376 00377 00378 00379 00380 00381 00382 00383 00384 00385 00386 00387 00388 00389 00390 00391 00392 00393 00394 00395 00396 00397 00398 00399 00400 00401 00402 00403 00404 00405 00406 00407 00408 00409 00410 00411 00412 00413 00414 00415 00416 00417 00418 00419 00420 00421 00422 00423 00424 00425 00426 00427 00428 00429 00430 00431 00432 00433 00434 00435 00436 00437 00438 00439 00440 00441 00442 00443 00444 00445 00446 00447 00448 00449 00450 00451 00452 00453 00454 00455 00456 00457 00458 00459 00460 00461 00462 00463 00464 00465 00466 00467 00468 00469 00470 00471 00472 00473 00474 00475 00476 00477 00478 00479 00480 00481 00482 00483 00484 00485 00486 00487 00488 00489 00490 00491 00492 00493 00494 00495 00496 00497 00498 00499 00500 00501 00502 00503 00504 00505 00506 00507 00508 00509 00510 00511 00512 00513 00514 00515 00516 00517 00518 00519 00520 00521 00522 00523 |
class RedeemerWarhead extends Pawn; #EXEC OBJ LOAD FILE=2K4Hud.utx var float Damage, DamageRadius, MomentumTransfer; var class<DamageType> MyDamageType; var Pawn OldPawn; var RedeemerTrail SmokeTrail; var float YawAccel, PitchAccel; // banking related var Shader InnerScopeShader, OuterScopeShader, OuterEdgeShader; var FinalBlend AltitudeFinalBlend; var float YawToBankingRatio, BankingResetRate, BankingToScopeRotationRatio; var int Banking, BankingVelocity, MaxBanking, BankingDamping; var float VelocityToAltitudePanRate, MaxAltitudePanRate; // camera shakes // var() vector ShakeRotMag; // how far to rot view var() vector ShakeRotRate; // how fast to rot view var() float ShakeRotTime; // how much time to rot the instigator's view var() vector ShakeOffsetMag; // max view offset vertically var() vector ShakeOffsetRate; // how fast to offset view vertically var() float ShakeOffsetTime; // how much time to offset view var bool bStaticScreen; var bool bFireForce; var TeamInfo MyTeam; replication { reliable if (Role == ROLE_Authority && bNetOwner) bStaticScreen; reliable if ( Role < ROLE_Authority ) ServerBlowUp; } function PlayerChangedTeam() { Died( None, class'DamageType', Location ); OldPawn.Died(None, class'DamageType', OldPawn.Location); } function TeamInfo GetTeam() { if ( PlayerReplicationInfo != None ) return PlayerReplicationInfo.Team; return MyTeam; } simulated function Destroyed() { RelinquishController(); if ( SmokeTrail != None ) SmokeTrail.Destroy(); Super.Destroyed(); } simulated function bool IsPlayerPawn() { return false; } event bool EncroachingOn( actor Other ) { if ( Other.bWorldGeometry ) return true; return false; } event EncroachedBy( actor Other ) { BlowUp(Location); } function RelinquishController() { if ( Controller == None ) return; Controller.Pawn = None; if ( !Controller.IsInState('GameEnded') ) { if ( (OldPawn != None) && (OldPawn.Health > 0) ) Controller.Possess(OldPawn); else { if ( OldPawn != None ) Controller.Pawn = OldPawn; else Controller.Pawn = self; Controller.PawnDied(Controller.Pawn); } } RemoteRole = Default.RemoteRole; Instigator = OldPawn; Controller = None; } simulated function PostBeginPlay() { local vector Dir; Dir = Vector(Rotation); Velocity = AirSpeed * Dir; Acceleration = Velocity; if ( Level.NetMode != NM_DedicatedServer) { SmokeTrail = Spawn(class'RedeemerTrail',self,,Location - 40 * Dir); SmokeTrail.SetBase(self); } } simulated function PostNetBeginPlay() { Super.PostNetBeginPlay(); if ( PlayerController(Controller) != None ) { Controller.SetRotation(Rotation); PlayerController(Controller).SetViewTarget(self); Controller.GotoState(LandMovementState); PlayOwnedSound(Sound'WeaponSounds.redeemer_shoot',SLOT_Interact,1.0); } } simulated function FaceRotation( rotator NewRotation, float DeltaTime ) { } function UpdateRocketAcceleration(float DeltaTime, float YawChange, float PitchChange) { local vector X,Y,Z; local float PitchThreshold; local int Pitch; local rotator TempRotation; local TexRotator ScopeTexRotator; local VariableTexPanner AltitudeTexPanner; YawAccel = (1-2*DeltaTime)*YawAccel + DeltaTime*YawChange; PitchAccel = (1-2*DeltaTime)*PitchAccel + DeltaTime*PitchChange; SetRotation(rotator(Velocity)); GetAxes(Rotation,X,Y,Z); PitchThreshold = 3000; Pitch = Rotation.Pitch & 65535; if ( (Pitch > 16384 - PitchThreshold) && (Pitch < 49152 + PitchThreshold) ) { if ( Pitch > 49152 - PitchThreshold ) PitchAccel = Max(PitchAccel,0); else if ( Pitch < 16384 + PitchThreshold ) PitchAccel = Min(PitchAccel,0); } Acceleration = Velocity + 5*(YawAccel*Y + PitchAccel*Z); if ( Acceleration == vect(0,0,0) ) Acceleration = Velocity; Acceleration = Normal(Acceleration) * AccelRate; BankingVelocity += DeltaTime * (YawToBankingRatio * YawChange - BankingResetRate * Banking - BankingDamping * BankingVelocity); Banking += DeltaTime * (BankingVelocity); Banking = Clamp(Banking, -MaxBanking, MaxBanking); TempRotation = Rotation; TempRotation.Roll = Banking; SetRotation(TempRotation); ScopeTexRotator = TexRotator(OuterScopeShader.Diffuse); if (ScopeTexRotator != None) ScopeTexRotator.Rotation.Yaw = Rotation.Roll; AltitudeTexPanner = VariableTexPanner(Shader(AltitudeFinalBlend.Material).Diffuse); if (AltitudeTexPanner != None) AltitudeTexPanner.PanRate = FClamp(Velocity.Z * VelocityToAltitudePanRate, -MaxAltitudePanRate, MaxAltitudePanRate); } simulated function PhysicsVolumeChange( PhysicsVolume Volume ) { } simulated function Landed( vector HitNormal ) { BlowUp(Location); } simulated function HitWall(vector HitNormal, actor Wall) { BlowUp(Location); } function UnPossessed() { BlowUp(Location); } simulated singular function Touch(Actor Other) { if ( Other.bBlockActors ) BlowUp(Location); } simulated singular function Bump(Actor Other) { if (Other.bBlockActors) BlowUp(Location); } function TakeDamage( int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, class<DamageType> damageType) { if ( (Damage > 0) && ((InstigatedBy == None) || (InstigatedBy.Controller == None) || (Instigator == None) || (Instigator.Controller == None) || !InstigatedBy.Controller.SameTeamAs(Instigator.Controller)) ) { if ( (InstigatedBy == None) || DamageType.Default.bVehicleHit || (DamageType == class'Crushed') ) BlowUp(Location); else { if ( PlayerController(Controller) != None ) PlayerController(Controller).PlayRewardAnnouncement('Denied',1, true); if ( PlayerController(InstigatedBy.Controller) != None ) PlayerController(InstigatedBy.Controller).PlayRewardAnnouncement('Denied',1, true); Spawn(class'SmallRedeemerExplosion'); RelinquishController(); SetCollision(false,false,false); HurtRadius(Damage, DamageRadius*0.125, MyDamageType, MomentumTransfer, Location); Destroy(); } } } function Fire( optional float F ) { ServerBlowUp(); if ( F == 1 ) { OldPawn.Health = -1; OldPawn.KilledBy(OldPawn); } } function ServerBlowUp() { BlowUp(Location); } function BlowUp(vector HitLocation) { local Emitter E; if ( Role == ROLE_Authority ) { bHidden = true; E = Spawn(class'RedeemerExplosion',,, HitLocation - 100 * Normal(Velocity), Rot(0,16384,0)); if ( Level.NetMode == NM_DedicatedServer ) { E.LifeSpan = 0.7; } GotoState('Dying'); } } function bool DoJump( bool bUpdating ) { return false; } singular event BaseChange() { } simulated function DrawHUD(Canvas Canvas) { local float Offset; local Plane SavedCM; SavedCM = Canvas.ColorModulate; Canvas.ColorModulate.X = 1; Canvas.ColorModulate.Y = 1; Canvas.ColorModulate.Z = 1; Canvas.ColorModulate.W = 1; Canvas.Style = 255; Canvas.SetPos(0,0); Canvas.DrawColor = class'Canvas'.static.MakeColor(255,255,255); if ( bStaticScreen ) Canvas.DrawTile( Material'ScreenNoiseFB', Canvas.SizeX, Canvas.SizeY, 0.0, 0.0, 512, 512 ); else if ( !Level.IsSoftwareRendering() ) { if (Canvas.ClipX >= Canvas.ClipY) { Offset = Canvas.ClipX / Canvas.ClipY; Canvas.DrawTile( OuterEdgeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512 * (1 - Offset), 0, Offset * 512, 512 ); Canvas.SetPos(0.5*Canvas.SizeX,0); Canvas.DrawTile( OuterEdgeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512, 0, -512 * Offset, 512 ); Canvas.SetPos(0,0.5* Canvas.SizeY); Canvas.DrawTile( OuterEdgeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512 * (1 - Offset), 512, Offset * 512, -512); Canvas.SetPos(0.5*Canvas.SizeX,0.5* Canvas.SizeY); Canvas.DrawTile( OuterEdgeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512, 512, -512 * Offset, -512 ); Canvas.SetPos(0, 0); Canvas.DrawTile( InnerScopeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512 * (1 - Offset), 0, Offset * 512, 512 ); Canvas.SetPos(0.5* Canvas.SizeX,0); Canvas.DrawTile( InnerScopeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512, 0, -512 * Offset, 512 ); Canvas.SetPos(0,0.5* Canvas.SizeY); Canvas.DrawTile( InnerScopeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512 * (1 - Offset), 512, Offset * 512, -512 ); Canvas.SetPos(0.5* Canvas.SizeX,0.5* Canvas.SizeY); Canvas.DrawTile( InnerScopeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512, 512, -512 * Offset, -512 ); Canvas.SetPos(0.5 * (Canvas.SizeX - Canvas.SizeY), 0); Canvas.DrawTile( OuterScopeShader, Canvas.SizeX, Canvas.SizeY, 0, 0, 1024 * Offset, 1024 ); Canvas.SetPos((512 * (Offset - 1) + 383) * (Canvas.SizeX / (1024 * Offset)), Canvas.SizeY *(451.0/(1024.0))); Canvas.DrawTile( AltitudeFinalBlend, Canvas.SizeX / (8 * Offset), Canvas.SizeY / 8, 0, 0, 128, 128); Canvas.SetPos((512 * (Offset - 1) + 383 + 2*(512-383) - 128) * (Canvas.SizeX / (1024 * Offset)), Canvas.SizeY *(451.0/1024.0)); Canvas.DrawTile( AltitudeFinalBlend, Canvas.SizeX / (8 * Offset), Canvas.SizeY / 8, 128, 0, -128, 128); } else { Offset = Canvas.ClipY / Canvas.ClipX; Canvas.DrawTile( OuterEdgeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 0, 512 * (1 - Offset), 512, 512 * Offset); Canvas.SetPos(0.5*Canvas.SizeX,0); Canvas.DrawTile( OuterEdgeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512, 512 * (1 - Offset), -512, 512 * Offset); Canvas.SetPos(0,0.5* Canvas.SizeY); Canvas.DrawTile( OuterEdgeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 0, 512, 512, -512 * Offset); Canvas.SetPos(0.5*Canvas.SizeX,0.5* Canvas.SizeY); Canvas.DrawTile( OuterEdgeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512, 512, -512, -512 * Offset); Canvas.SetPos(0, 0); Canvas.DrawTile( InnerScopeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 0, 512 * (1 - Offset), 512, 512 * Offset); Canvas.SetPos(0.5*Canvas.SizeX,0); Canvas.DrawTile( InnerScopeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512, 512 * (1 - Offset), -512, 512 * Offset); Canvas.SetPos(0,0.5* Canvas.SizeY); Canvas.DrawTile( InnerScopeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 0, 512, 512, -512 * Offset); Canvas.SetPos(0.5*Canvas.SizeX,0.5* Canvas.SizeY); Canvas.DrawTile( InnerScopeShader, 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512, 512, -512, -512 * Offset); Canvas.SetPos(0, 0.5 * (Canvas.SizeY - Canvas.SizeX)); Canvas.DrawTile( OuterScopeShader, Canvas.SizeX, Canvas.SizeY, 0, 0, 1024, 1024 * Offset ); Canvas.SetPos(Canvas.SizeX * (383.0/1024.0), (512 * (Offset - 1) + 451) * (Canvas.SizeY / (1024 * Offset))); Canvas.DrawTile( AltitudeFinalBlend, Canvas.SizeX / 8, Canvas.SizeY / (8 * Offset), 0, 0, 128, 128); Canvas.SetPos(Canvas.SizeX * ((383 + 2*(512-383) - 128)) / 1024, (512 * (Offset - 1) + 451) * (Canvas.SizeY / (1024 * Offset))); Canvas.DrawTile( AltitudeFinalBlend, Canvas.SizeX / 8, Canvas.SizeY / (8 * Offset), 128, 0, -128, 128); } } Canvas.ColorModulate = SavedCM; } simulated event PlayDying(class<DamageType> DamageType, vector HitLoc); function Died(Controller Killer, class<DamageType> damageType, vector HitLocation) { BlowUp(Location); } function bool CheatWalk() { return false; } function bool CheatGhost() { return false; } function bool CheatFly() { return false; } function ShouldCrouch(bool Crouch) {} event SetWalking(bool bNewIsWalking) {} function Suicide() { Blowup(Location); if ( (OldPawn != None) && (OldPawn.Health > 0) ) OldPawn.KilledBy(OldPawn); } auto state Flying { function Tick(float DeltaTime) { if ( !bFireForce && (PlayerController(Controller) != None) ) { bFireForce = true; PlayerController(Controller).ClientPlayForceFeedback("FlakCannonAltFire"); // jdf } if ( (OldPawn == None) || (OldPawn.Health <= 0) ) BlowUp(Location); else if ( Controller == None ) { if ( OldPawn.Controller == None ) OldPawn.KilledBy(OldPawn); BlowUp(Location); } } } state Dying { ignores Trigger, Bump, HitWall, HeadVolumeChange, PhysicsVolumeChange, Falling, BreathTimer; function Fire( optional float F ) {} function BlowUp(vector HitLocation) {} function ServerBlowUp() {} function Timer() {} function TakeDamage( int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, class<DamageType> damageType) {} function BeginState() { bHidden = true; bStaticScreen = true; SetPhysics(PHYS_None); SetCollision(false,false,false); Spawn(class'IonCore',,, Location, Rotation); if ( SmokeTrail != None ) SmokeTrail.Destroy(); ShakeView(); } function ShakeView() { local Controller C; local PlayerController PC; local float Dist, Scale; for ( C=Level.ControllerList; C!=None; C=C.NextController ) { PC = PlayerController(C); if ( PC != None && 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); C.ShakeView(ShakeRotMag*Scale, ShakeRotRate, ShakeRotTime, ShakeOffsetMag*Scale, ShakeOffsetRate, ShakeOffsetTime); } } } } Begin: Instigator = self; PlaySound(sound'WeaponSounds.redeemer_explosionsound'); HurtRadius(Damage, DamageRadius*0.125, MyDamageType, MomentumTransfer, Location); Sleep(0.5); HurtRadius(Damage, DamageRadius*0.300, MyDamageType, MomentumTransfer, Location); Sleep(0.2); HurtRadius(Damage, DamageRadius*0.475, MyDamageType, MomentumTransfer, Location); Sleep(0.2); RelinquishController(); HurtRadius(Damage, DamageRadius*0.650, MyDamageType, MomentumTransfer, Location); Sleep(0.2); HurtRadius(Damage, DamageRadius*0.825, MyDamageType, MomentumTransfer, Location); Sleep(0.2); HurtRadius(Damage, DamageRadius*1.000, MyDamageType, MomentumTransfer, Location); Destroy(); } defaultproperties { Damage=250.000000 DamageRadius=2000.000000 MomentumTransfer=200000.000000 MyDamageType=Class'XWeapons.DamTypeRedeemer' InnerScopeShader=Shader'2K4Hud.ZoomFX.RDM_InnerScopeShader' OuterScopeShader=Shader'2K4Hud.ZoomFX.RDM_OuterScopeShader' OuterEdgeShader=Shader'2K4Hud.ZoomFX.RDM_OuterEdgeShader' AltitudeFinalBlend=FinalBlend'2K4Hud.ZoomFX.RDM_AltitudeFinal' YawToBankingRatio=60.000000 BankingResetRate=15.000000 BankingToScopeRotationRatio=8.000000 MaxBanking=20000 BankingDamping=10 VelocityToAltitudePanRate=0.001750 MaxAltitudePanRate=10.000000 ShakeRotMag=(Z=250.000000) ShakeRotRate=(Z=2500.000000) ShakeRotTime=6.000000 ShakeOffsetMag=(Z=10.000000) ShakeOffsetRate=(Z=200.000000) ShakeOffsetTime=10.000000 bSimulateGravity=Falsch bDirectHitWall=Wahr bHideRegularHUD=Wahr bSpecialHUD=Wahr bNoTeamBeacon=Wahr bCanUse=Falsch AirSpeed=1000.000000 AccelRate=2000.000000 BaseEyeHeight=0.000000 EyeHeight=0.000000 LandMovementState="PlayerRocketing" LightType=LT_Steady LightEffect=LE_QuadraticNonIncidence LightHue=28 LightBrightness=255.000000 LightRadius=6.000000 DrawType=DT_StaticMesh StaticMesh=StaticMesh'WeaponStaticMesh.RedeemerMissile' bDynamicLight=Wahr bStasis=Falsch bReplicateInstigator=Wahr bNetInitialRotation=Wahr Physics=PHYS_Flying NetPriority=3.000000 AmbientSound=Sound'WeaponSounds.Misc.redeemer_flight' DrawScale=0.500000 AmbientGlow=96 bGameRelevant=Wahr bCanTeleport=Falsch SoundRadius=100.000000 TransientSoundVolume=1.000000 TransientSoundRadius=5000.000000 CollisionRadius=24.000000 CollisionHeight=12.000000 bBlockActors=Falsch ForceType=FT_DragAlong ForceRadius=100.000000 ForceScale=5.000000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |