From 44a742237592f29f994c4d6c1aaafd15ac1cb781 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 6 Mar 2020 18:11:37 +0000 Subject: [PATCH] Fix variable naming in Locomotor. --- OpenRA.Mods.Common/Traits/World/Locomotor.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/World/Locomotor.cs b/OpenRA.Mods.Common/Traits/World/Locomotor.cs index 6ea5b1993e..c666afc32e 100644 --- a/OpenRA.Mods.Common/Traits/World/Locomotor.cs +++ b/OpenRA.Mods.Common/Traits/World/Locomotor.cs @@ -336,14 +336,14 @@ namespace OpenRA.Mods.Common.Traits return world.ActorMap.FreeSubCell(cell, preferredSubCell); } - bool IsBlockedBy(Actor self, Actor otherActor, Actor ignoreActor, BlockedByActor check, CellFlag cellFlag) + bool IsBlockedBy(Actor actor, Actor otherActor, Actor ignoreActor, BlockedByActor check, CellFlag cellFlag) { if (otherActor == ignoreActor) return false; // If the check allows: We are not blocked by units that we can force to move out of the way. if (check <= BlockedByActor.Immovable && cellFlag.HasCellFlag(CellFlag.HasMovableActor) && - self.Owner.Stances[otherActor.Owner] == Stance.Ally) + actor.Owner.Stances[otherActor.Owner] == Stance.Ally) { var mobile = otherActor.TraitOrDefault(); if (mobile != null && !mobile.IsTraitDisabled && !mobile.IsTraitPaused && !mobile.IsImmovable) @@ -352,14 +352,14 @@ namespace OpenRA.Mods.Common.Traits // If the check allows: we are not blocked by moving units. if (check <= BlockedByActor.Stationary && cellFlag.HasCellFlag(CellFlag.HasMovingActor) && - IsMoving(self, otherActor)) + IsMoving(actor, otherActor)) return false; if (cellFlag.HasCellFlag(CellFlag.HasTemporaryBlocker)) { // If there is a temporary blocker in our path, but we can remove it, we are not blocked. var temporaryBlocker = otherActor.TraitOrDefault(); - if (temporaryBlocker != null && temporaryBlocker.CanRemoveBlockage(otherActor, self)) + if (temporaryBlocker != null && temporaryBlocker.CanRemoveBlockage(otherActor, actor)) return false; } @@ -371,7 +371,7 @@ namespace OpenRA.Mods.Common.Traits // PERF: Avoid LINQ. var crushables = otherActor.TraitsImplementing(); foreach (var crushable in crushables) - if (crushable.CrushableBy(otherActor, self, Info.Crushes)) + if (crushable.CrushableBy(otherActor, actor, Info.Crushes)) return false; return true;