Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*******************************************************************************
- * GPLLIProj_FieldMedic generated by Eliot.UELib using UE Explorer.
- * Eliot.UELib © 2009-2015 Eliot van Uytfanghe. All rights reserved.
- * http://eliotvu.com
- *
- * All rights belong to their respective owners.
- *******************************************************************************/
- class GPLLIProj_FieldMedic extends ROBallisticProjectile;
- var() Vector ShakeRotMag;
- var() Vector ShakeRotRate;
- var() float ShakeRotTime;
- var() Vector ShakeOffsetMag;
- var() Vector ShakeOffsetRate;
- var() float ShakeOffsetTime;
- var() Vector RotMag;
- var() Vector RotRate;
- var() float RotTime;
- var() Vector OffsetMag;
- var() Vector OffsetRate;
- var() float OffsetTime;
- var PanzerfaustTrail SmokeTrail;
- var Vector Dir;
- var bool bRing;
- var bool bHitWater;
- var bool bWaterStart;
- var() Sound ExplosionSound;
- var bool bDisintegrated;
- var() Sound DisintegrateSound;
- var bool bDud;
- var() float ArmDistSquared;
- var class<DamageType> ImpactDamageType;
- var int ImpactDamage;
- var() float StraightFlightTime;
- var float TotalFlightTime;
- var bool bOutOfPropellant;
- var Vector OuttaPropLocation;
- var bool bHasExploded;
- var string StaticMeshRef;
- var string ExplosionSoundRef;
- var string DisintegrateSoundRef;
- var float HealthBoost;
- var float ArmorBoost;
- replication
- {
- // Pos:0x000
- reliable if(Role == ROLE_Authority)
- bDud
- }
- static function PreloadAssets()
- {
- default.ExplosionSound = Sound(DynamicLoadObject(default.ExplosionSoundRef, class'Sound', true));
- default.DisintegrateSound = Sound(DynamicLoadObject(default.DisintegrateSoundRef, class'Sound', true));
- UpdateDefaultStaticMesh(StaticMesh(DynamicLoadObject(default.StaticMeshRef, class'StaticMesh', true)));
- //return;
- }
- static function bool UnloadAssets()
- {
- default.ExplosionSound = none;
- default.DisintegrateSound = none;
- UpdateDefaultStaticMesh(none);
- return true;
- //return;
- }
- simulated function PostNetReceive()
- {
- // End:0x2E
- if(bHidden && !bDisintegrated)
- {
- Disintegrate(Location, vect(0.0, 0.0, 1.0));
- }
- //return;
- }
- function Timer()
- {
- Destroy();
- //return;
- }
- function ShakeView()
- {
- local Controller C;
- local PlayerController PC;
- local float dist, Scale;
- C = Level.ControllerList;
- J0x14:
- // End:0x11B [Loop If]
- if(C != none)
- {
- PC = PlayerController(C);
- // End:0x104
- if((PC != none) && PC.ViewTarget != none)
- {
- dist = VSize(Location - PC.ViewTarget.Location);
- // End:0x104
- if(dist < (DamageRadius * 2.0))
- {
- // End:0xA9
- if(dist < DamageRadius)
- {
- Scale = 1.0;
- }
- // End:0xC9
- else
- {
- Scale = ((DamageRadius * 2.0) - dist) / DamageRadius;
- }
- C.ShakeView(ShakeRotMag * Scale, ShakeRotRate, ShakeRotTime, ShakeOffsetMag * Scale, ShakeOffsetRate, ShakeOffsetTime);
- }
- }
- C = C.nextController;
- // [Loop Continue]
- goto J0x14;
- }
- //return;
- }
- simulated function HitWall(Vector HitNormal, Actor Wall)
- {
- // End:0x1F
- if(Instigator != none)
- {
- OrigLoc = Instigator.Location;
- }
- // End:0x8C
- if(!bDud && (VSizeSquared(Location - OrigLoc) < ArmDistSquared) || OrigLoc == vect(0.0, 0.0, 0.0))
- {
- bDud = true;
- LifeSpan = 1.0;
- Velocity = vect(0.0, 0.0, 0.0);
- SetPhysics(2);
- }
- // End:0xA7
- if(!bDud)
- {
- super(Projectile).HitWall(HitNormal, Wall);
- }
- //return;
- }
- simulated function Explode(Vector HitLocation, Vector HitNormal)
- {
- local Controller C;
- local PlayerController LocalPlayer;
- bHasExploded = true;
- // End:0x34
- if(bDud)
- {
- Velocity = vect(0.0, 0.0, 0.0);
- LifeSpan = 1.0;
- SetPhysics(2);
- }
- UnresolvedNativeFunction_97(ExplosionSound,, 2.0);
- // End:0x74
- if(EffectIsRelevant(Location, false))
- {
- UnresolvedNativeFunction_97(class'EXhealingFX',,, HitLocation + (HitNormal * float(20)), rotator(HitNormal));
- }
- BlowUp(HitLocation);
- Destroy();
- LocalPlayer = Level.GetLocalPlayerController();
- // End:0xFB
- if((LocalPlayer != none) && VSize(Location - LocalPlayer.ViewTarget.Location) < DamageRadius)
- {
- LocalPlayer.ShakeView(RotMag, RotRate, RotTime, OffsetMag, OffsetRate, OffsetTime);
- }
- C = Level.ControllerList;
- J0x10F:
- // End:0x1B0 [Loop If]
- if(C != none)
- {
- // End:0x199
- if(((PlayerController(C) != none) && C != LocalPlayer) && VSize(Location - PlayerController(C).ViewTarget.Location) < DamageRadius)
- {
- C.ShakeView(RotMag, RotRate, RotTime, OffsetMag, OffsetRate, OffsetTime);
- }
- C = C.nextController;
- // [Loop Continue]
- goto J0x10F;
- }
- //return;
- }
- simulated function Disintegrate(Vector HitLocation, Vector HitNormal)
- {
- bDisintegrated = true;
- bHidden = true;
- // End:0x42
- if(Role == ROLE_Authority)
- {
- SetTimer(0.10, false);
- NetUpdateTime = Level.TimeSeconds - float(1);
- }
- UnresolvedNativeFunction_97(DisintegrateSound,, 2.0);
- // End:0x7D
- if(EffectIsRelevant(Location, false))
- {
- UnresolvedNativeFunction_97(class'SirenNadeDeflect',,, HitLocation, rotator(vect(0.0, 0.0, 1.0)));
- }
- //return;
- }
- simulated function PostBeginPlay()
- {
- local Rotator SmokeRotation;
- BCInverse = 1.0 / BallisticCoefficient;
- // End:0x6B
- if(Level.NetMode != NM_DedicatedServer)
- {
- SmokeTrail = UnresolvedNativeFunction_97(class'PanzerfaustTrail', self);
- SmokeTrail.SetBase(self);
- SmokeRotation.Pitch = 32768;
- SmokeTrail.SetRelativeRotation(SmokeRotation);
- }
- OrigLoc = Location;
- // End:0xA0
- if(!bDud)
- {
- Dir = vector(Rotation);
- Velocity = Speed * Dir;
- }
- // End:0xCC
- if(PhysicsVolume.bWaterVolume)
- {
- bHitWater = true;
- Velocity = 0.60 * Velocity;
- }
- super(Projectile).PostBeginPlay();
- //return;
- }
- function TakeDamage(int Damage, Pawn instigatedBy, Vector HitLocation, Vector Momentum, class<DamageType> DamageType, optional int HitIndex)
- {
- // End:0x2A
- if(DamageType == class'SirenScreamDamage')
- {
- Disintegrate(HitLocation, vect(0.0, 0.0, 1.0));
- }
- // End:0x4D
- else
- {
- // End:0x4D
- if(!bDud)
- {
- Explode(HitLocation, vect(0.0, 0.0, 0.0));
- }
- }
- //return;
- }
- simulated function Destroyed()
- {
- // End:0x1A
- if(SmokeTrail != none)
- {
- SmokeTrail.HandleOwnerDestroyed();
- }
- // End:0x57
- if((!bHasExploded && !bHidden) && !bDud)
- {
- Explode(Location, vect(0.0, 0.0, 1.0));
- }
- // End:0x85
- if(bHidden && !bDisintegrated)
- {
- Disintegrate(Location, vect(0.0, 0.0, 1.0));
- }
- super(Actor).Destroyed();
- //return;
- }
- simulated function HurtRadius(float DamageAmount, float DamageRadius, class<DamageType> DamageType, float Momentum, Vector HitLocation)
- {
- local Actor Victims;
- local float damageScale, dist;
- local Vector dirs;
- local int NumKilled;
- local KFMonster KFMonsterVictim;
- local Pawn P;
- local KFPawn KFP;
- local array<Pawn> CheckedPawns;
- local int i;
- local bool bAlreadyChecked;
- // End:0x0B
- if(bHurtEntry)
- {
- return;
- }
- bHurtEntry = true;
- // End:0x3BE
- foreach CollidingActors(class'Actor', Victims, DamageRadius, HitLocation)
- {
- // End:0x3BD
- if(((((Victims != self) && HurtWall != Victims) && Victims.Role == ROLE_Authority) && !Victims.UnresolvedNativeFunction_97('FluidSurfaceInfo')) && ExtendedZCollision(Victims) == none)
- {
- dirs = Victims.Location - HitLocation;
- dist = FMax(1.0, VSize(dirs));
- dirs = dirs / dist;
- damageScale = 1.0 - FMax(0.0, (dist - Victims.CollisionRadius) / DamageRadius);
- // End:0x134
- if((Instigator == none) || Instigator.Controller == none)
- {
- Victims.SetDelayedDamageInstigatorController(InstigatorController);
- }
- // End:0x14A
- if(Victims == LastTouched)
- {
- LastTouched = none;
- }
- P = Pawn(Victims);
- // End:0x28D
- if(P != none)
- {
- i = 0;
- J0x16C:
- // End:0x1A6 [Loop If]
- if(i < CheckedPawns.Length)
- {
- // End:0x19C
- if(CheckedPawns[i] == P)
- {
- bAlreadyChecked = true;
- // [Explicit Break]
- goto J0x1A6;
- }
- ++ i;
- J0x1A6:
- // [Loop Continue]
- goto J0x16C;
- }
- // End:0x1C2
- if(bAlreadyChecked)
- {
- bAlreadyChecked = false;
- P = none;
- continue;
- }
- KFMonsterVictim = KFMonster(Victims);
- // End:0x1FA
- if((KFMonsterVictim != none) && KFMonsterVictim.Health <= 0)
- {
- KFMonsterVictim = none;
- }
- KFP = KFPawn(Victims);
- // End:0x233
- if(KFMonsterVictim != none)
- {
- damageScale *= KFMonsterVictim.GetExposureTo(HitLocation);
- }
- // End:0x259
- else
- {
- // End:0x259
- if(KFP != none)
- {
- damageScale *= KFP.GetExposureTo(HitLocation);
- }
- }
- CheckedPawns[CheckedPawns.Length] = P;
- // End:0x286
- if(damageScale <= float(0))
- {
- P = none;
- continue;
- }
- // End:0x28D
- else
- {
- P = none;
- }
- }
- // End:0x2B0
- if(KFPawn(Victims) != none)
- {
- AfflictTarget(Victims, damageScale);
- }
- // End:0x326
- else
- {
- Victims.TakeDamage(int(damageScale * DamageAmount), Instigator, Victims.Location - ((0.50 * (Victims.CollisionHeight + Victims.CollisionRadius)) * dirs), (damageScale * Momentum) * dirs, DamageType);
- }
- // End:0x383
- if((Vehicle(Victims) != none) && Vehicle(Victims).Health > 0)
- {
- Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation);
- }
- // End:0x3BD
- if(((Role == ROLE_Authority) && KFMonsterVictim != none) && KFMonsterVictim.Health <= 0)
- {
- ++ NumKilled;
- }
- }
- }
- // End:0x5E8
- if((((LastTouched != none) && LastTouched != self) && LastTouched.Role == ROLE_Authority) && !LastTouched.UnresolvedNativeFunction_97('FluidSurfaceInfo'))
- {
- Victims = LastTouched;
- LastTouched = none;
- dirs = Victims.Location - HitLocation;
- dist = FMax(1.0, VSize(dirs));
- dirs = dirs / dist;
- damageScale = FMax(Victims.CollisionRadius / (Victims.CollisionRadius + Victims.CollisionHeight), 1.0 - FMax(0.0, (dist - Victims.CollisionRadius) / DamageRadius));
- // End:0x4F2
- if((Instigator == none) || Instigator.Controller == none)
- {
- Victims.SetDelayedDamageInstigatorController(InstigatorController);
- }
- // End:0x515
- if(KFPawn(Victims) != none)
- {
- AfflictTarget(Victims, damageScale);
- }
- // End:0x58B
- else
- {
- Victims.TakeDamage(int(damageScale * DamageAmount), Instigator, Victims.Location - ((0.50 * (Victims.CollisionHeight + Victims.CollisionRadius)) * dirs), (damageScale * Momentum) * dirs, DamageType);
- }
- // End:0x5E8
- if((Vehicle(Victims) != none) && Vehicle(Victims).Health > 0)
- {
- Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation);
- }
- }
- // End:0x657
- if(Role == ROLE_Authority)
- {
- // End:0x629
- if(NumKilled >= 4)
- {
- KFGameType(Level.Game).DramaticEvent(0.050);
- }
- // End:0x657
- else
- {
- // End:0x657
- if(NumKilled >= 2)
- {
- KFGameType(Level.Game).DramaticEvent(0.030);
- }
- }
- }
- bHurtEntry = false;
- //return;
- }
- simulated function ProcessTouch(Actor Other, Vector HitLocation)
- {
- // End:0x38
- if(((Other == none) || Other == Instigator) || Other.Base == Instigator)
- {
- return;
- }
- // End:0x4A
- if(KFBulletWhipAttachment(Other) != none)
- {
- return;
- }
- // End:0xB5
- if(((KFHumanPawn(Other) != none) && Instigator != none) && KFHumanPawn(Other).PlayerReplicationInfo.Team.TeamIndex == Instigator.PlayerReplicationInfo.Team.TeamIndex)
- {
- return;
- }
- // End:0xD4
- if(Instigator != none)
- {
- OrigLoc = Instigator.Location;
- }
- // End:0x190
- if(!bDud && (VSizeSquared(Location - OrigLoc) < ArmDistSquared) || OrigLoc == vect(0.0, 0.0, 0.0))
- {
- // End:0x165
- if(Role == ROLE_Authority)
- {
- AmbientSound = none;
- UnresolvedNativeFunction_97(sound'PTRD_deflect04',, 2.0);
- Other.TakeDamage(ImpactDamage, Instigator, HitLocation, Normal(Velocity), ImpactDamageType);
- }
- bDud = true;
- Velocity = vect(0.0, 0.0, 0.0);
- LifeSpan = 1.0;
- SetPhysics(2);
- }
- // End:0x1BD
- if(!bDud)
- {
- Explode(HitLocation, Normal(HitLocation - Other.Location));
- }
- //return;
- }
- simulated function Tick(float DeltaTime)
- {
- SetRotation(rotator(Normal(Velocity)));
- // End:0x48
- if(!bOutOfPropellant)
- {
- // End:0x35
- if(TotalFlightTime <= StraightFlightTime)
- {
- TotalFlightTime += DeltaTime;
- }
- // End:0x48
- else
- {
- OuttaPropLocation = Location;
- bOutOfPropellant = true;
- }
- }
- // End:0x68
- if(bOutOfPropellant && Physics != 2)
- {
- SetPhysics(2);
- }
- //return;
- }
- simulated function Landed(Vector HitNormal)
- {
- SetPhysics(0);
- // End:0x23
- if(!bDud)
- {
- Explode(Location, HitNormal);
- }
- // End:0x26
- else
- {
- Destroy();
- }
- //return;
- }
- function AfflictTarget(Actor Victims, float Scale)
- {
- local KFHumanPawn targ;
- local int MedicReward;
- local KFPlayerReplicationInfo PRI;
- local float HealSum;
- targ = KFHumanPawn(Victims);
- // End:0x22
- if(Role != ROLE_Authority)
- {
- return;
- }
- // End:0x2B8
- if(float(targ.Health) < targ.HealthMax)
- {
- MedicReward = int(HealthBoost * Scale);
- PRI = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo);
- // End:0xB7
- if((PRI != none) && PRI.ClientVeteranSkill != none)
- {
- MedicReward *= PRI.ClientVeteranSkill.static.GetHealPotency(PRI);
- }
- HealSum = float(MedicReward);
- // End:0x14A
- if(((float(targ.Health) + targ.healthToGive) + float(MedicReward)) > targ.HealthMax)
- {
- MedicReward = int(targ.HealthMax - (float(targ.Health) + targ.healthToGive));
- // End:0x14A
- if(MedicReward < 0)
- {
- MedicReward = 0;
- }
- }
- targ.GiveHealth(int(HealSum), int(targ.HealthMax));
- // End:0x2B8
- if(PRI != none)
- {
- // End:0x1C4
- if((MedicReward > 0) && KFSteamStatsAndAchievements(PRI.SteamStatsAndAchievements) != none)
- {
- KFSteamStatsAndAchievements(PRI.SteamStatsAndAchievements).AddDamageHealed(MedicReward, true);
- }
- MedicReward = int((FMin(float(MedicReward), targ.HealthMax) / targ.HealthMax) * float(60));
- PRI.Score += float(MedicReward);
- PRI.ThreeSecondScore += MedicReward;
- PRI.Team.Score += float(MedicReward);
- // End:0x26B
- if(KFHumanPawn(Instigator) != none)
- {
- KFHumanPawn(Instigator).AlphaAmount = 255;
- }
- // End:0x2B8
- if(GrenadePistolLLI(Instigator.Weapon) != none)
- {
- GrenadePistolLLI(Instigator.Weapon).ClientSuccessfulHeal(targ.PlayerReplicationInfo.PlayerName);
- }
- }
- }
- // End:0x302
- if(targ.ShieldStrength < float(100))
- {
- targ.ShieldStrength = float(Min(int(targ.ShieldStrength + (ArmorBoost * Scale)), 100));
- }
- //return;
- }
- defaultproperties
- {
- ShakeRotMag=(X=600.0,Y=600.0,Z=600.0)
- ShakeRotRate=(X=12500.0,Y=12500.0,Z=12500.0)
- ShakeRotTime=6.0
- ShakeOffsetMag=(X=5.0,Y=10.0,Z=5.0)
- ShakeOffsetRate=(X=300.0,Y=300.0,Z=300.0)
- ShakeOffsetTime=3.50
- RotMag=(X=700.0,Y=700.0,Z=700.0)
- RotRate=(X=12500.0,Y=12500.0,Z=12500.0)
- RotTime=6.0
- OffsetMag=(X=5.0,Y=10.0,Z=7.0)
- OffsetRate=(X=300.0,Y=300.0,Z=300.0)
- OffsetTime=3.50
- ExplosionSound=SoundGroup'KF_MP7Snd.Dart.MP7_DartImpact'
- ImpactDamageType=Class'KFMod.DamTypeRocketImpact'
- StraightFlightTime=0.250
- HealthBoost=20.0
- ArmorBoost=30.0
- AmbientVolumeScale=5.0
- Speed=3000.0
- MaxSpeed=4000.0
- Damage=50.0
- DamageRadius=400.0
- MomentumTransfer=5000.0
- MyDamageType=Class'KFMod.DamTypeM79Grenade'
- ExplosionDecal=Class'KFMod.KFScorchMark'
- DrawType=8
- StaticMesh=StaticMesh'GrenadePistolLLI_A.GrenadePistolLLI_gren_st'
- bUpdateSimulatedPosition=true
- LifeSpan=10.0
- Skins(0)=Texture'GrenadePistolLLI_A.GrenadePistolLLI_T.GrenadePistolLLI_st_med'
- bUnlit=false
- SoundVolume=255
- SoundRadius=250.0
- TransientSoundVolume=2.0
- TransientSoundRadius=500.0
- bNetNotify=true
- bBlockHitPointTraces=false
- ForceRadius=300.0
- ForceScale=10.0
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement