From c582d29a940447594ac297c002419d8b65a04652 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 6 Mar 2021 02:04:31 +0700 Subject: [PATCH] Fix using tabs instead of spaces in some places --- .../FixAmmoSellingClass_CrossbowPickup.uc | 2 +- .../MutatorListener_FixAmmoSelling.uc | 2 +- sources/FixDualiesCost/DualiesCostRule.uc | 30 +++---- sources/FixFFHack/FFHackRule.uc | 78 ++++++++++--------- sources/FixPipes/FixPipes.uc | 2 +- sources/FixPipes/PipesSafetyCollision.uc | 22 +++--- 6 files changed, 69 insertions(+), 67 deletions(-) diff --git a/sources/FixAmmoSelling/FixedClasses/FixAmmoSellingClass_CrossbowPickup.uc b/sources/FixAmmoSelling/FixedClasses/FixAmmoSellingClass_CrossbowPickup.uc index 6fd07c1..8f92c76 100644 --- a/sources/FixAmmoSelling/FixedClasses/FixAmmoSellingClass_CrossbowPickup.uc +++ b/sources/FixAmmoSelling/FixedClasses/FixAmmoSellingClass_CrossbowPickup.uc @@ -22,5 +22,5 @@ class FixAmmoSellingClass_CrossbowPickup extends CrossbowPickup; defaultproperties { - AmmoCost = 11.6 + AmmoCost = 11.6 } \ No newline at end of file diff --git a/sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc b/sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc index 35db4c3..4c69dad 100644 --- a/sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc +++ b/sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc @@ -29,7 +29,7 @@ static function bool CheckReplacement(Actor other, out byte isSuperRelevant) // as they might not even exist on clients. if (class'FixAmmoSelling'.static.IsReplacer(other.class)) { - ReplaceOldPickup(Pickup(other)); + ReplaceOldPickup(Pickup(other)); return false; } CheckAbusableWeapon(KFWeapon(other)); diff --git a/sources/FixDualiesCost/DualiesCostRule.uc b/sources/FixDualiesCost/DualiesCostRule.uc index 25acc16..1009388 100644 --- a/sources/FixDualiesCost/DualiesCostRule.uc +++ b/sources/FixDualiesCost/DualiesCostRule.uc @@ -1,6 +1,6 @@ /** * This rule detects any pickup events to allow us to - * properly record and/or fix pistols' prices. + * properly record and/or fix pistols' prices. * Copyright 2019 Anton Tarasenko *------------------------------------------------------------------------------ * This file is part of Acedia. @@ -21,22 +21,22 @@ class DualiesCostRule extends GameRules; function bool OverridePickupQuery( - Pawn other, - Pickup item, - out byte allowPickup + Pawn other, + Pickup item, + out byte allowPickup ) { - local KFWeaponPickup weaponPickup; - local FixDualiesCost dualiesCostFix; - weaponPickup = KFWeaponPickup(item); - dualiesCostFix = FixDualiesCost(class'FixDualiesCost'.static.GetInstance()); - if (weaponPickup != none && dualiesCostFix != none) - { - dualiesCostFix.ApplyPendingValues(); - dualiesCostFix.StoreSinglePistolValues(); - dualiesCostFix.SetNextSellValue(weaponPickup.sellValue); - } - return super.OverridePickupQuery(other, item, allowPickup); + local KFWeaponPickup weaponPickup; + local FixDualiesCost dualiesCostFix; + weaponPickup = KFWeaponPickup(item); + dualiesCostFix = FixDualiesCost(class'FixDualiesCost'.static.GetInstance()); + if (weaponPickup != none && dualiesCostFix != none) + { + dualiesCostFix.ApplyPendingValues(); + dualiesCostFix.StoreSinglePistolValues(); + dualiesCostFix.SetNextSellValue(weaponPickup.sellValue); + } + return super.OverridePickupQuery(other, item, allowPickup); } defaultproperties diff --git a/sources/FixFFHack/FFHackRule.uc b/sources/FixFFHack/FFHackRule.uc index fa5e04c..7ab58d8 100644 --- a/sources/FixFFHack/FFHackRule.uc +++ b/sources/FixFFHack/FFHackRule.uc @@ -1,6 +1,6 @@ /** * This rule detects suspicious attempts to deal damage and - * applies friendly fire scaling according to 'FixFFHack's rules. + * applies friendly fire scaling according to 'FixFFHack's rules. * Copyright 2019 Anton Tarasenko *------------------------------------------------------------------------------ * This file is part of Acedia. @@ -21,51 +21,53 @@ class FFHackRule extends GameRules; function int NetDamage( - int originalDamage, - int damage, - Pawn injured, - Pawn instigator, - Vector hitLocation, - out Vector momentum, - class damageType + int originalDamage, + int damage, + Pawn injured, + Pawn instigator, + Vector hitLocation, + out Vector momentum, + class damageType ) { - local KFGameType gameType; - local FixFFHack ffHackFix; - gameType = KFGameType(level.game); - // Something is very wrong and we can just bail on this damage - if (damageType == none || gameType == none) return 0; + local KFGameType gameType; + local FixFFHack ffHackFix; + gameType = KFGameType(level.game); + // Something is very wrong and we can just bail on this damage + if (damageType == none || gameType == none) { + return 0; + } - // We only check when suspicious instigators that aren't a world - if (!damageType.default.bCausedByWorld && IsSuspicious(instigator)) - { - ffHackFix = FixFFHack(class'FixFFHack'.static.GetInstance()); - if (ffHackFix != none && ffHackFix.ShouldScaleDamage(damageType)) - { - // Remove pushback to avoid environmental kills - momentum = Vect(0.0, 0.0, 0.0); - damage *= gameType.friendlyFireScale; - } - } - return super.NetDamage( originalDamage, damage, injured, instigator, - hitLocation, momentum, damageType); + // We only check when suspicious instigators that aren't a world + if (!damageType.default.bCausedByWorld && IsSuspicious(instigator)) + { + ffHackFix = FixFFHack(class'FixFFHack'.static.GetInstance()); + if (ffHackFix != none && ffHackFix.ShouldScaleDamage(damageType)) + { + // Remove pushback to avoid environmental kills + momentum = Vect(0.0, 0.0, 0.0); + damage *= gameType.friendlyFireScale; + } + } + return super.NetDamage( originalDamage, damage, injured, instigator, + hitLocation, momentum, damageType); } private function bool IsSuspicious(Pawn instigator) { - // Instigator vanished - if (instigator == none) return true; + // Instigator vanished + if (instigator == none) return true; - // Instigator already became spectator - if (KFPawn(instigator) != none) - { - if (instigator.playerReplicationInfo != none) - { - return instigator.playerReplicationInfo.bOnlySpectator; - } - return true; // Replication info is gone => suspicious - } - return false; + // Instigator already became spectator + if (KFPawn(instigator) != none) + { + if (instigator.playerReplicationInfo != none) + { + return instigator.playerReplicationInfo.bOnlySpectator; + } + return true; // Replication info is gone => suspicious + } + return false; } defaultproperties diff --git a/sources/FixPipes/FixPipes.uc b/sources/FixPipes/FixPipes.uc index a33916c..02e5fb9 100644 --- a/sources/FixPipes/FixPipes.uc +++ b/sources/FixPipes/FixPipes.uc @@ -316,7 +316,7 @@ private final function DoPipeProximityCheck( Vector checkLocation) { local Pawn checkPawn; - local float threatLevel; + local float threatLevel; local PipeBombProjectile pipe; pipe = pipeRecord.pipe; pipe.bAlwaysRelevant = false; diff --git a/sources/FixPipes/PipesSafetyCollision.uc b/sources/FixPipes/PipesSafetyCollision.uc index 90c25fc..73d6442 100644 --- a/sources/FixPipes/PipesSafetyCollision.uc +++ b/sources/FixPipes/PipesSafetyCollision.uc @@ -46,18 +46,18 @@ public final static function PipesSafetyCollision ProtectPipes( // particular fixes. private function bool IsSuspicious(Pawn instigator) { - // Instigator vanished - if (instigator == none) return true; + // Instigator vanished + if (instigator == none) return true; - // Instigator already became spectator - if (KFPawn(instigator) != none) - { - if (instigator.playerReplicationInfo != none) { - return instigator.playerReplicationInfo.bOnlySpectator; - } - return true; // Replication info is gone => suspicious - } - return false; + // Instigator already became spectator + if (KFPawn(instigator) != none) + { + if (instigator.playerReplicationInfo != none) { + return instigator.playerReplicationInfo.bOnlySpectator; + } + return true; // Replication info is gone => suspicious + } + return false; } // Revert changes made by caller `PipesSafetyCollision`, letting corresponding