Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- simulated function ProcessTouch(Actor Other, Vector HitLocation)
- {
- local KFPlayerReplicationInfo PRI;
- local int MedicReward;
- local KFHumanPawn Healed;
- local float HealSum; // for modifying based on perks
- if ( Other == none || Other == Instigator || Other.Base == Instigator )
- return;
- if( Role == ROLE_Authority )
- {
- Healed = KFHumanPawn(Other);
- if( Healed != none )
- {
- HitHealTarget(HitLocation, -vector(Rotation));
- }
- if( Instigator != none && Healed != none && Healed.Health > 0 &&
- Healed.Health < Healed.HealthMax )
- {
- MedicReward = HealBoostAmount;
- PRI = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo);
- if ( PRI != none && PRI.ClientVeteranSkill != none )
- {
- MedicReward *= PRI.ClientVeteranSkill.Static.GetHealPotency(PRI);
- }
- HealSum = MedicReward;
- if ( (Healed.Health + Healed.healthToGive + MedicReward) > Healed.HealthMax )
- {
- MedicReward = Healed.HealthMax - (Healed.Health + Healed.healthToGive);
- if ( MedicReward < 0 )
- {
- MedicReward = 0;
- }
- }
- Healed.GiveHealth(HealSum, Healed.HealthMax);
- if ( PRI != None )
- {
- if ( MedicReward > 0 && KFSteamStatsAndAchievements(PRI.SteamStatsAndAchievements) != none && (KFPCServ.bDisableHeal == False)) //Add progress if the bDisableHeal is set to False (Unchecked by default)
- {
- KFSteamStatsAndAchievements(PRI.SteamStatsAndAchievements).AddDamageHealed(MedicReward, true);
- }
- // Give the medic reward money as a percentage of how much of the person's health they healed
- MedicReward = int((FMin(float(MedicReward),Healed.HealthMax)/Healed.HealthMax) * 60); // Increased to 80 in Balance Round 6, reduced to 60 in Round 7
- PRI.Score += MedicReward;
- PRI.ThreeSecondScore += MedicReward;
- PRI.Team.Score += MedicReward;
- if ( KFHumanPawn(Instigator) != none )
- {
- KFHumanPawn(Instigator).AlphaAmount = 255;
- }
- if( MP5SD(Instigator.Weapon) != none )
- {
- MP5SD(Instigator.Weapon).ClientSuccessfulHealMP5SDLLI(Healed.PlayerReplicationInfo.PlayerName);
- }
- }
- }
- }
- else if( KFHumanPawn(Other) != none )
- {
- bHidden = true;
- SetPhysics(PHYS_None);
- return;
- }
- Explode(HitLocation,-vector(Rotation));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement