Browse Source

Fix code style

master
Anton Tarasenko 4 years ago
parent
commit
229ecca122
  1. 4
      config/AcediaFixes.ini
  2. 9
      sources/FixAmmoSelling/AmmoPickupStalker.uc
  3. 30
      sources/FixAmmoSelling/FixAmmoSelling.uc
  4. 6
      sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc
  5. 24
      sources/FixDoshSpam/FixDoshSpam.uc
  6. 3
      sources/FixDoshSpam/MutatorListener_FixDoshSpam.uc
  7. 3
      sources/FixDualiesCost/DualiesCostRule.uc
  8. 24
      sources/FixDualiesCost/FixDualiesCost.uc
  9. 3
      sources/FixFFHack/FFHackRule.uc
  10. 9
      sources/FixFFHack/FixFFHack.uc
  11. 4
      sources/FixInfiniteNades/FixInfiniteNades.uc
  12. 15
      sources/FixInventoryAbuse/FixInventoryAbuse.uc
  13. 3
      sources/FixSpectatorCrash/BroadcastListener_FixSpectatorCrash.uc
  14. 15
      sources/FixSpectatorCrash/FixSpectatorCrash.uc
  15. 20
      sources/FixZedTimeLags/FixZedTimeLags.uc

4
config/AcediaFixes.ini

@ -102,8 +102,8 @@ autoEnable=true
; Setting this flag to 'true' will allow to throw grenades by calling ; Setting this flag to 'true' will allow to throw grenades by calling
; 'ServerThrow' directly, as long as player has necessary ammo. ; 'ServerThrow' directly, as long as player has necessary ammo.
; This can allow some players to throw grenades much quicker than intended, ; This can allow some players to throw grenades much quicker than intended,
; therefore it's suggested to keep this flag set to 'false'. ; so if you wish to prevent it, keep this flag set to `false`.
ignoreTossFlags=false ignoreTossFlags=true
[AcediaFixes.FixDoshSpam] [AcediaFixes.FixDoshSpam]

9
sources/FixAmmoSelling/AmmoPickupStalker.uc

@ -58,20 +58,17 @@ event Touch(Actor other)
if (!wasActive && !target.IsInState('Pickup')) return; if (!wasActive && !target.IsInState('Pickup')) return;
ammoSellingFix = FixAmmoSelling(class'FixAmmoSelling'.static.GetInstance()); ammoSellingFix = FixAmmoSelling(class'FixAmmoSelling'.static.GetInstance());
if (ammoSellingFix != none) if (ammoSellingFix != none) {
{
ammoSellingFix.RecordAmmoPickup(Pawn(other), target); ammoSellingFix.RecordAmmoPickup(Pawn(other), target);
} }
} }
event Tick(float delta) event Tick(float delta)
{ {
if (target != none) if (target != none) {
{
wasActive = target.IsInState('Pickup'); wasActive = target.IsInState('Pickup');
} }
else else {
{
Destroy(); Destroy();
} }
} }

30
sources/FixAmmoSelling/FixAmmoSelling.uc

@ -139,13 +139,11 @@ protected function OnEnabled()
local KFWeapon nextWeapon; local KFWeapon nextWeapon;
local KFAmmoPickup nextPickup; local KFAmmoPickup nextPickup;
// Find all abusable weapons // Find all abusable weapons
foreach level.DynamicActors(class'KFMod.KFWeapon', nextWeapon) foreach level.DynamicActors(class'KFMod.KFWeapon', nextWeapon) {
{
FixWeapon(nextWeapon); FixWeapon(nextWeapon);
} }
// Start tracking all ammo boxes // Start tracking all ammo boxes
foreach level.DynamicActors(class'KFMod.KFAmmoPickup', nextPickup) foreach level.DynamicActors(class'KFMod.KFAmmoPickup', nextPickup) {
{
class'AmmoPickupStalker'.static.StalkAmmoPickup(nextPickup); class'AmmoPickupStalker'.static.StalkAmmoPickup(nextPickup);
} }
} }
@ -167,14 +165,12 @@ protected function OnDisabled()
registeredWeapons.length = 0; registeredWeapons.length = 0;
// Kill all the stalkers; // Kill all the stalkers;
// to be safe, avoid destroying them directly in the iterator. // to be safe, avoid destroying them directly in the iterator.
foreach level.DynamicActors(class'AmmoPickupStalker', nextStalker) foreach level.DynamicActors(class'AmmoPickupStalker', nextStalker) {
{
stalkers[stalkers.length] = nextStalker; stalkers[stalkers.length] = nextStalker;
} }
for (i = 0; i < stalkers.length; i += 1) for (i = 0; i < stalkers.length; i += 1)
{ {
if (stalkers[i] != none) if (stalkers[i] != none) {
{
stalkers[i].Destroy(); stalkers[i].Destroy();
} }
} }
@ -187,8 +183,7 @@ public static final function bool IsReplacer(class<Actor> pickupClass)
if (pickupClass == none) return false; if (pickupClass == none) return false;
for (i = 0; i < default.rules.length; i += 1) for (i = 0; i < default.rules.length; i += 1)
{ {
if (pickupClass == default.rules[i].pickupReplacement) if (pickupClass == default.rules[i].pickupReplacement) {
{
return true; return true;
} }
} }
@ -205,8 +200,7 @@ public final function FixWeapon(KFWeapon potentialAbuser)
for (i = 0; i < registeredWeapons.length; i += 1) for (i = 0; i < registeredWeapons.length; i += 1)
{ {
if (registeredWeapons[i].weapon == potentialAbuser) if (registeredWeapons[i].weapon == potentialAbuser) {
{
return; return;
} }
} }
@ -234,8 +228,7 @@ private final function WeaponRecord FindAmmoInstance(WeaponRecord record)
invIter = record.weapon.instigator.inventory; invIter = record.weapon.instigator.inventory;
while (invIter != none) while (invIter != none)
{ {
if (record.weapon.ammoClass[0] == invIter.class) if (record.weapon.ammoClass[0] == invIter.class) {
{
ammo = KFAmmunition(invIter); ammo = KFAmmunition(invIter);
} }
invIter = invIter.inventory; invIter = invIter.inventory;
@ -251,8 +244,7 @@ private final function WeaponRecord FindAmmoInstance(WeaponRecord record)
// Calculates how much more player should have paid for 'ammoAmount' // Calculates how much more player should have paid for 'ammoAmount'
// amount of ammo, compared to how much trader took after our fix. // amount of ammo, compared to how much trader took after our fix.
private final function float GetPriceCorrection private final function float GetPriceCorrection(
(
KFWeapon kfWeapon, KFWeapon kfWeapon,
int ammoAmount int ammoAmount
) )
@ -319,8 +311,7 @@ private final function WeaponRecord TaxAmmoChange(WeaponRecord record)
// (actual price + our correction). // (actual price + our correction).
// But if user is extra concerned about it, - // But if user is extra concerned about it, -
// we can additionally for force the score above 0. // we can additionally for force the score above 0.
if (!allowNegativeDosh) if (!allowNegativeDosh) {
{
replicationInfo.score = FMax(0, replicationInfo.score); replicationInfo.score = FMax(0, replicationInfo.score);
} }
} }
@ -368,8 +359,7 @@ event Tick(float delta)
continue; continue;
} }
// ...find ammo if it's missing // ...find ammo if it's missing
if (registeredWeapons[i].ammo == none) if (registeredWeapons[i].ammo == none) {
{
registeredWeapons[i] = FindAmmoInstance(registeredWeapons[i]); registeredWeapons[i] = FindAmmoInstance(registeredWeapons[i]);
} }
// ...tax for ammo, if we can // ...tax for ammo, if we can

6
sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc

@ -70,8 +70,7 @@ private static function ReplacePickupWith(Pickup oldPickup)
} }
// TODO: this is code duplication, some sort of solution is needed // TODO: this is code duplication, some sort of solution is needed
static final function KFWeapon GetWeaponOfClass static final function KFWeapon GetWeaponOfClass(
(
Pawn playerPawn, Pawn playerPawn,
class<Inventory> weaponClass class<Inventory> weaponClass
) )
@ -82,8 +81,7 @@ static final function KFWeapon GetWeaponOfClass
invIter = playerPawn.inventory; invIter = playerPawn.inventory;
while (invIter != none) while (invIter != none)
{ {
if (invIter.class == weaponClass) if (invIter.class == weaponClass) {
{
return KFWeapon(invIter); return KFWeapon(invIter);
} }
invIter = invIter.inventory; invIter = invIter.inventory;

24
sources/FixDoshSpam/FixDoshSpam.uc

@ -95,8 +95,7 @@ protected function OnEnabled()
local CashPickup nextCash; local CashPickup nextCash;
// Find all wads of cash laying around on the map, // Find all wads of cash laying around on the map,
// so that we could accordingly limit the cash spam. // so that we could accordingly limit the cash spam.
foreach level.DynamicActors(class'KFMod.CashPickup', nextCash) foreach level.DynamicActors(class'KFMod.CashPickup', nextCash) {
{
wads[wads.length] = nextCash; wads[wads.length] = nextCash;
} }
} }
@ -119,8 +118,7 @@ public final function bool IsDoshStreamOverLimit()
local int i; local int i;
local float overallContribution; local float overallContribution;
overallContribution = 0.0; overallContribution = 0.0;
for (i = 0; i < currentContributors.length; i += 1) for (i = 0; i < currentContributors.length; i += 1) {
{
overallContribution += currentContributors[i].contribution; overallContribution += currentContributors[i].contribution;
} }
return (overallContribution > lastTickDuration * GetCurrentDPSLimit()); return (overallContribution > lastTickDuration * GetCurrentDPSLimit());
@ -130,8 +128,7 @@ public final function bool IsDoshStreamOverLimit()
private final function float GetCurrentDPSLimit() private final function float GetCurrentDPSLimit()
{ {
local float speedScale; local float speedScale;
if (doshPerSecondLimitMax < doshPerSecondLimitMin) if (doshPerSecondLimitMax < doshPerSecondLimitMin) {
{
return doshPerSecondLimitMax; return doshPerSecondLimitMax;
} }
speedScale = Float(wads.length) / Float(criticalDoshAmount); speedScale = Float(wads.length) / Float(criticalDoshAmount);
@ -151,8 +148,7 @@ private final function int GetContributorIndex(PlayerController player)
for (i = 0; i < currentContributors.length; i += 1) for (i = 0; i < currentContributors.length; i += 1)
{ {
if (currentContributors[i].player == player) if (currentContributors[i].player == player) {
{
return i; return i;
} }
} }
@ -170,8 +166,7 @@ public final function AddContribution(PlayerController player, CashPickup cash)
// Check if given dosh was already accounted for. // Check if given dosh was already accounted for.
for (i = 0; i < wads.length; i += 1) for (i = 0; i < wads.length; i += 1)
{ {
if (cash == wads[i]) if (cash == wads[i]) {
{
return; return;
} }
} }
@ -194,8 +189,7 @@ private final function ReducePlayerContributions(float trueTimePassed)
local float streamReduction; local float streamReduction;
streamReduction = trueTimePassed * streamReduction = trueTimePassed *
(GetCurrentDPSLimit() / currentContributors.length); (GetCurrentDPSLimit() / currentContributors.length);
for (i = 0; i < currentContributors.length; i += 1) for (i = 0; i < currentContributors.length; i += 1) {
{
currentContributors[i].contribution -= streamReduction; currentContributors[i].contribution -= streamReduction;
} }
} }
@ -207,12 +201,10 @@ private final function CleanWadsArray()
i = 0; i = 0;
while (i < wads.length) while (i < wads.length)
{ {
if (wads[i] == none) if (wads[i] == none) {
{
wads.Remove(i, 1); wads.Remove(i, 1);
} }
else else {
{
i += 1; i += 1;
} }
} }

3
sources/FixDoshSpam/MutatorListener_FixDoshSpam.uc

@ -36,8 +36,7 @@ static function bool CheckReplacement(Actor other, out byte isSuperRelevant)
// the limit and the one trying to throw this cash contributed to it. // the limit and the one trying to throw this cash contributed to it.
// We allow other players to throw at least one wad of cash. // We allow other players to throw at least one wad of cash.
player = PlayerController(other.instigator.controller); player = PlayerController(other.instigator.controller);
if (doshFix.IsDoshStreamOverLimit() && doshFix.IsContributor(player)) if (doshFix.IsDoshStreamOverLimit() && doshFix.IsContributor(player)) {
{
return false; return false;
} }
// If we do spawn cash - record this contribution. // If we do spawn cash - record this contribution.

3
sources/FixDualiesCost/DualiesCostRule.uc

@ -20,8 +20,7 @@
*/ */
class DualiesCostRule extends GameRules; class DualiesCostRule extends GameRules;
function bool OverridePickupQuery function bool OverridePickupQuery(
(
Pawn other, Pawn other,
Pickup item, Pickup item,
out byte allowPickup out byte allowPickup

24
sources/FixDualiesCost/FixDualiesCost.uc

@ -150,8 +150,7 @@ protected function OnEnabled()
{ {
local KFWeapon nextWeapon; local KFWeapon nextWeapon;
// Find all frags, that spawned when this fix wasn't running. // Find all frags, that spawned when this fix wasn't running.
foreach level.DynamicActors(class'KFMod.KFWeapon', nextWeapon) foreach level.DynamicActors(class'KFMod.KFWeapon', nextWeapon) {
{
RegisterSinglePistol(nextWeapon, false); RegisterSinglePistol(nextWeapon, false);
} }
level.game.AddGameModifier(Spawn(class'DualiesCostRule')); level.game.AddGameModifier(Spawn(class'DualiesCostRule'));
@ -192,8 +191,7 @@ public final function SetNextSellValue(int newValue)
// Finds a weapon of a given class in given 'Pawn' 's inventory. // Finds a weapon of a given class in given 'Pawn' 's inventory.
// Returns 'none' if weapon isn't there. // Returns 'none' if weapon isn't there.
private final function KFWeapon GetWeaponOfClass private final function KFWeapon GetWeaponOfClass(
(
Pawn playerPawn, Pawn playerPawn,
class<KFWeapon> weaponClass class<KFWeapon> weaponClass
) )
@ -204,8 +202,7 @@ private final function KFWeapon GetWeaponOfClass
invIter = playerPawn.inventory; invIter = playerPawn.inventory;
while (invIter != none) while (invIter != none)
{ {
if (invIter.class == weaponClass) if (invIter.class == weaponClass) {
{
return KFWeapon(invIter); return KFWeapon(invIter);
} }
invIter = invIter.inventory; invIter = invIter.inventory;
@ -227,12 +224,10 @@ private final function int GetIndexAs(KFWeapon weapon, bool asSingle)
for (i = 0; i < dualiesClasses.length; i += 1) for (i = 0; i < dualiesClasses.length; i += 1)
{ {
if (asSingle && dualiesClasses[i].single == weapon.class) if (asSingle && dualiesClasses[i].single == weapon.class) {
{
return i; return i;
} }
if (!asSingle && dualiesClasses[i].dual == weapon.class) if (!asSingle && dualiesClasses[i].dual == weapon.class) {
{
return i; return i;
} }
} }
@ -266,8 +261,7 @@ private final function float GetFullCost(KFWeapon weapon)
// If passed weapon is a pistol - we start tracking it's value; // If passed weapon is a pistol - we start tracking it's value;
// Otherwise - do nothing. // Otherwise - do nothing.
public final function RegisterSinglePistol public final function RegisterSinglePistol(
(
KFWeapon singlePistol, KFWeapon singlePistol,
bool justSpawned bool justSpawned
) )
@ -384,8 +378,7 @@ public final function FixCostAfterPickUp(KFWeapon dualPistols)
dualiesClasses[index].single); dualiesClasses[index].single);
if (singlePistol != none) return; if (singlePistol != none) return;
if (nextSellValue == -1) if (nextSellValue == -1) {
{
nextSellValue = GetFullCost(dualPistols) * 0.75; nextSellValue = GetFullCost(dualPistols) * 0.75;
} }
for (i = 0; i < storedValues.length; i += 1) for (i = 0; i < storedValues.length; i += 1)
@ -409,8 +402,7 @@ public final function ApplyPendingValues()
// Our fixes can only increase the correct ('!= -1') // Our fixes can only increase the correct ('!= -1')
// sell value of weapons, so if we only need to change sell value // sell value of weapons, so if we only need to change sell value
// if we're allowed to increase it or it's incorrect. // if we're allowed to increase it or it's incorrect.
if (allowSellValueIncrease || pendingValues[i].weapon.sellValue == -1) if (allowSellValueIncrease || pendingValues[i].weapon.sellValue == -1) {
{
pendingValues[i].weapon.sellValue = pendingValues[i].value; pendingValues[i].weapon.sellValue = pendingValues[i].value;
} }
} }

3
sources/FixFFHack/FFHackRule.uc

@ -20,8 +20,7 @@
*/ */
class FFHackRule extends GameRules; class FFHackRule extends GameRules;
function int NetDamage function int NetDamage(
(
int originalDamage, int originalDamage,
int damage, int damage,
Pawn injured, Pawn injured,

9
sources/FixFFHack/FixFFHack.uc

@ -97,14 +97,15 @@ public final function bool ShouldScaleDamage(class<DamageType> damageType)
local array< class<DamageType> > exceptions; local array< class<DamageType> > exceptions;
if (damageType == none) return false; if (damageType == none) return false;
if (scaleByDefault) if (scaleByDefault) {
exceptions = neverScale; exceptions = neverScale;
else }
else {
exceptions = alwaysScale; exceptions = alwaysScale;
}
for (i = 0; i < exceptions.length; i += 1) for (i = 0; i < exceptions.length; i += 1)
{ {
if (exceptions[i] == damageType) if (exceptions[i] == damageType) {
{
return (!scaleByDefault); return (!scaleByDefault);
} }
} }

4
sources/FixInfiniteNades/FixInfiniteNades.uc

@ -48,7 +48,7 @@ class FixInfiniteNades extends Feature
// Setting this flag to 'true' will allow to throw grenades by calling // Setting this flag to 'true' will allow to throw grenades by calling
// 'ServerThrow' directly, as long as player has necessary ammo. // 'ServerThrow' directly, as long as player has necessary ammo.
// This can allow some players to throw grenades much quicker than intended, // This can allow some players to throw grenades much quicker than intended,
// therefore it's suggested to keep this flag set to 'false'. // so if you wish to prevent it, keep this flag set to `false`.
var private config const bool ignoreTossFlags; var private config const bool ignoreTossFlags;
// Records how much ammo given frag grenade ('Frag') has. // Records how much ammo given frag grenade ('Frag') has.
@ -228,7 +228,7 @@ event Tick(float delta)
defaultproperties defaultproperties
{ {
ignoreTossFlags = false ignoreTossFlags = true
// Listeners // Listeners
requiredListeners(0) = class'MutatorListener_FixInfiniteNades' requiredListeners(0) = class'MutatorListener_FixInfiniteNades'
} }

15
sources/FixInventoryAbuse/FixInventoryAbuse.uc

@ -49,8 +49,7 @@ protected function OnEnabled()
{ {
local float actualInterval; local float actualInterval;
actualInterval = checkInterval; actualInterval = checkInterval;
if (actualInterval <= 0) if (actualInterval <= 0) {
{
actualInterval = 0.25; actualInterval = 0.25;
} }
SetTimer(actualInterval, true); SetTimer(actualInterval, true);
@ -124,8 +123,7 @@ private final function bool HasDuplicateGuns(KFHumanPawn playerPawn)
if (nextWeapon == none) continue; if (nextWeapon == none) continue;
if (nextWeapon.bKFNeverThrow) continue; if (nextWeapon.bKFNeverThrow) continue;
rootClass = GetRootPickupClass(nextWeapon); rootClass = GetRootPickupClass(nextWeapon);
if (rootClass != none) if (rootClass != none) {
{
rootList[rootList.length] = rootClass; rootList[rootList.length] = rootClass;
} }
} }
@ -134,8 +132,7 @@ private final function bool HasDuplicateGuns(KFHumanPawn playerPawn)
{ {
for (j = i + 1; j < rootList.length; j += 1) for (j = i + 1; j < rootList.length; j += 1)
{ {
if (rootList[i] == rootList[j]) if (rootList[i] == rootList[j]) {
{
return true; return true;
} }
} }
@ -203,12 +200,10 @@ event Timer()
for (i = 0; i < connections.length; i += 1) for (i = 0; i < connections.length; i += 1)
{ {
nextPawn = none; nextPawn = none;
if (connections[i].controllerReference != none) if (connections[i].controllerReference != none) {
{
nextPawn = KFHumanPawn(connections[i].controllerReference.pawn); nextPawn = KFHumanPawn(connections[i].controllerReference.pawn);
} }
if (IsWeightLimitViolated(nextPawn) || HasDuplicateGuns(nextPawn)) if (IsWeightLimitViolated(nextPawn) || HasDuplicateGuns(nextPawn)) {
{
DropEverything(nextPawn); DropEverything(nextPawn);
} }
} }

3
sources/FixSpectatorCrash/BroadcastListener_FixSpectatorCrash.uc

@ -24,8 +24,7 @@ class BroadcastListener_FixSpectatorCrash extends BroadcastListenerBase
var private const int becomeAlivePlayerID; var private const int becomeAlivePlayerID;
var private const int becomeSpectatorID; var private const int becomeSpectatorID;
static function bool HandleLocalized static function bool HandleLocalized(
(
Actor sender, Actor sender,
BroadcastEvents.LocalizedMessage message BroadcastEvents.LocalizedMessage message
) )

15
sources/FixSpectatorCrash/FixSpectatorCrash.uc

@ -105,8 +105,7 @@ private final function int GetCooldownIndex(PlayerController player)
for (i = 0; i < currentCooldowns.length; i += 1) for (i = 0; i < currentCooldowns.length; i += 1)
{ {
if (currentCooldowns[i].player == player) if (currentCooldowns[i].player == player) {
{
return i; return i;
} }
} }
@ -122,8 +121,7 @@ public final function bool IsViolator(PlayerController player)
for (i = 0; i < violators.length; i += 1) for (i = 0; i < violators.length; i += 1)
{ {
if (violators[i] == player) if (violators[i] == player) {
{
return true; return true;
} }
} }
@ -146,8 +144,7 @@ public final function NotifyStatusChange(PlayerController player)
player.Destroy(); player.Destroy();
currentCooldowns.Remove(index, 1); currentCooldowns.Remove(index, 1);
violators[violators.length] = player; violators[violators.length] = player;
if (allowServerBlock) if (allowServerBlock) {
{
SetBlock(true); SetBlock(true);
} }
} }
@ -201,8 +198,7 @@ private final function TryUnblocking()
for (i = 0; i < violators.length; i += 1) for (i = 0; i < violators.length; i += 1)
{ {
if (violators[i] != none) if (violators[i] != none) {
{
return; return;
} }
} }
@ -232,8 +228,7 @@ private final function int GetRealPlayers()
player = connections[i].controllerReference; player = connections[i].controllerReference;
if (player == none) continue; if (player == none) continue;
if (player.playerReplicationInfo == none) continue; if (player.playerReplicationInfo == none) continue;
if (!player.playerReplicationInfo.bOnlySpectator) if (!player.playerReplicationInfo.bOnlySpectator) {
{
realPlayersAmount += 1; realPlayersAmount += 1;
} }
} }

20
sources/FixZedTimeLags/FixZedTimeLags.uc

@ -69,12 +69,10 @@ var private KFGameType gameType;
protected function OnEnabled() protected function OnEnabled()
{ {
gameType = KFGameType(level.game); gameType = KFGameType(level.game);
if (gameType == none) if (gameType == none) {
{
Destroy(); Destroy();
} }
else if (disableTick) else if (disableTick) {
{
gameType.Disable('Tick'); gameType.Disable('Tick');
} }
} }
@ -82,8 +80,7 @@ protected function OnEnabled()
protected function OnDisabled() protected function OnDisabled()
{ {
gameType = KFGameType(level.game); gameType = KFGameType(level.game);
if (gameType != none && disableTick) if (gameType != none && disableTick) {
{
gameType.Enable('Tick'); gameType.Enable('Tick');
} }
} }
@ -93,11 +90,10 @@ event Tick(float delta)
local float trueTimePassed; local float trueTimePassed;
if (gameType == none) return; if (gameType == none) return;
if (!gameType.bZEDTimeActive) return; if (!gameType.bZEDTimeActive) return;
// Unfortunately we need to keep disabling 'Tick' probe function, // Unfortunately we need to keep disabling `Tick()` probe function,
// because it constantly gets enabled back and I don't know where // because it constantly gets enabled back and I don't know where
// (maybe native code?); only really matters during zed time. // (maybe native code?); only really matters during zed time.
if (disableTick) if (disableTick) {
{
gameType.Disable('Tick'); gameType.Disable('Tick');
} }
// How much real (not in-game) time has passed // How much real (not in-game) time has passed
@ -105,8 +101,7 @@ event Tick(float delta)
gameType.currentZEDTimeDuration -= trueTimePassed; gameType.currentZEDTimeDuration -= trueTimePassed;
// Handle speeding up phase // Handle speeding up phase
if (gameType.bSpeedingBackUp) if (gameType.bSpeedingBackUp) {
{
DoSpeedBackUp(trueTimePassed); DoSpeedBackUp(trueTimePassed);
} }
else if (gameType.currentZEDTimeDuration < GetSpeedupDuration()) else if (gameType.currentZEDTimeDuration < GetSpeedupDuration())
@ -163,8 +158,7 @@ private final function DoSpeedBackUp(float trueTimePassed)
updateCooldown -= trueTimePassed; updateCooldown -= trueTimePassed;
return; return;
} }
else else {
{
updateCooldown = GetFullUpdateCooldown(); updateCooldown = GetFullUpdateCooldown();
} }
slowdownScale = gameType.currentZEDTimeDuration / GetSpeedupDuration(); slowdownScale = gameType.currentZEDTimeDuration / GetSpeedupDuration();

Loading…
Cancel
Save