strip some redundancy from UnitOrders, but it still sucks; fix nudges breaking everything
This commit is contained in:
@@ -25,7 +25,7 @@ namespace OpenRA.Network
|
|||||||
var client = Game.LobbyInfo.Clients.FirstOrDefault(c => c.Index == clientId);
|
var client = Game.LobbyInfo.Clients.FirstOrDefault(c => c.Index == clientId);
|
||||||
if (client != null)
|
if (client != null)
|
||||||
{
|
{
|
||||||
var player = Game.world.players.Values.FirstOrDefault(p => p.Index == client.Index);
|
var player = world.players.Values.FirstOrDefault(p => p.Index == client.Index);
|
||||||
if (player != null && player.WinState == WinState.Lost)
|
if (player != null && player.WinState == WinState.Lost)
|
||||||
Game.AddChatLine(client.Color1, client.Name + " (Dead)", order.TargetString);
|
Game.AddChatLine(client.Color1, client.Name + " (Dead)", order.TargetString);
|
||||||
else
|
else
|
||||||
@@ -38,9 +38,9 @@ namespace OpenRA.Network
|
|||||||
var client = Game.LobbyInfo.Clients.FirstOrDefault(c => c.Index == clientId);
|
var client = Game.LobbyInfo.Clients.FirstOrDefault(c => c.Index == clientId);
|
||||||
if (client != null)
|
if (client != null)
|
||||||
{
|
{
|
||||||
var player = Game.world.players.Values.FirstOrDefault(p => p.Index == client.Index);
|
var player = world.players.Values.FirstOrDefault(p => p.Index == client.Index);
|
||||||
var display = (world.GameHasStarted) ?
|
var display = (world.GameHasStarted) ?
|
||||||
player != null && (Game.world.LocalPlayer != null && player.Stances[Game.world.LocalPlayer] == Stance.Ally
|
player != null && (world.LocalPlayer != null && player.Stances[world.LocalPlayer] == Stance.Ally
|
||||||
|| player.WinState == WinState.Lost) :
|
|| player.WinState == WinState.Lost) :
|
||||||
client == Game.LocalClient || (client.Team == Game.LocalClient.Team && client.Team != 0);
|
client == Game.LocalClient || (client.Team == Game.LocalClient.Team && client.Team != 0);
|
||||||
|
|
||||||
|
|||||||
@@ -251,8 +251,8 @@ namespace OpenRA.Traits
|
|||||||
return; /* don't allow ourselves to be pushed around
|
return; /* don't allow ourselves to be pushed around
|
||||||
* by the enemy! */
|
* by the enemy! */
|
||||||
|
|
||||||
if (self.GetCurrentActivity() is Move)
|
if (!self.IsIdle)
|
||||||
return; /* we're *already* moving; nudging isn't going to help */
|
return; /* don't nudge if we're busy doing something! */
|
||||||
|
|
||||||
// pick an adjacent available cell.
|
// pick an adjacent available cell.
|
||||||
var availCells = new List<int2>();
|
var availCells = new List<int2>();
|
||||||
|
|||||||
Reference in New Issue
Block a user