Skip to content

Commit

Permalink
fix capturing of neutral buildings
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisforbes committed Aug 1, 2010
1 parent ca98668 commit 67418e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions OpenRA.Mods.RA/EngineerCapture.cs
Expand Up @@ -8,11 +8,11 @@
*/
#endregion

using OpenRA.Mods.RA.Activities;
using System.Drawing;
using OpenRA.Effects;
using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
using OpenRA.Traits.Activities;
using System.Drawing;

namespace OpenRA.Mods.RA
{
Expand All @@ -23,7 +23,7 @@ public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
{
if (mi.Button != MouseButton.Right) return null;
if (underCursor == null) return null;
if (self.Owner.Stances[underCursor.Owner] != Stance.Enemy) return null;
if (self.Owner.Stances[underCursor.Owner] == Stance.Ally) return null;
if (!underCursor.traits.Contains<Building>() || !underCursor.Info.Traits.Get<BuildingInfo>().Capturable) return null;

return new Order("CaptureBuilding", self, underCursor);
Expand Down
12 changes: 6 additions & 6 deletions OpenRA.Mods.RA/EngineerRepair.cs
Expand Up @@ -6,13 +6,13 @@
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion

using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
#endregion

using System.Drawing;
using OpenRA.Effects;
using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
using OpenRA.Traits.Activities;
using OpenRA.Effects;
using System.Drawing;

namespace OpenRA.Mods.RA
{
Expand Down

0 comments on commit 67418e0

Please sign in to comment.