Made that last more efficient...

This commit is contained in:
Niklas Ulf Anders Cullberg
2012-10-09 16:19:44 +02:00
parent 7ea3b0be99
commit ff4e874d47
+2 -1
View File
@@ -107,10 +107,11 @@ namespace DepthsBelow
// Send orders with right click // Send orders with right click
if (ms.RightButton == ButtonState.Released && lastMouseState.RightButton == ButtonState.Pressed) if (ms.RightButton == ButtonState.Released && lastMouseState.RightButton == ButtonState.Pressed)
{ {
if (checkingDirection == false)
{
foreach (var unit in core.Squad) foreach (var unit in core.Squad)
if (unit.Selected) if (unit.Selected)
{ {
if (checkingDirection == false) {
unit.GetComponent<Component.PathFinder>().Goal = Grid.WorldToGrid(mouseWorldPos); unit.GetComponent<Component.PathFinder>().Goal = Grid.WorldToGrid(mouseWorldPos);
} }
} }