moved Game.players, LocalPlayer, localPlayerIndex to World. Setting LocalPlayer via settings is broken.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace OpenRa.Orders
|
||||
{
|
||||
var loc = mi.Location + Game.viewport.Location;
|
||||
var underCursor = Game.world.FindUnits(loc, loc)
|
||||
.Where(a => a.Owner == Game.LocalPlayer
|
||||
.Where(a => a.Owner == Game.world.LocalPlayer
|
||||
&& a.traits.Contains<Building>()
|
||||
&& a.traits.Contains<Selectable>()).FirstOrDefault();
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenRa.Orders
|
||||
return;
|
||||
|
||||
var hasFact = Game.world.Actors
|
||||
.Any(a => a.Owner == Game.LocalPlayer && a.traits.Contains<ConstructionYard>());
|
||||
.Any(a => a.Owner == Game.world.LocalPlayer && a.traits.Contains<ConstructionYard>());
|
||||
|
||||
if (!hasFact)
|
||||
Game.controller.CancelInputMode();
|
||||
|
||||
Reference in New Issue
Block a user