gap shouldnt affect owner
This commit is contained in:
@@ -26,11 +26,12 @@ namespace OpenRa
|
|||||||
public int PowerProvided = 0;
|
public int PowerProvided = 0;
|
||||||
public int PowerDrained = 0;
|
public int PowerDrained = 0;
|
||||||
|
|
||||||
public Shroud Shroud = new Shroud();
|
public Shroud Shroud;
|
||||||
public Dictionary<string, SupportPower> SupportPowers;
|
public Dictionary<string, SupportPower> SupportPowers;
|
||||||
|
|
||||||
public Player( int index, Session.Client client )
|
public Player( int index, Session.Client client )
|
||||||
{
|
{
|
||||||
|
Shroud = new Shroud(this);
|
||||||
Game.world.Add(this.PlayerActor = new Actor("Player", new int2(int.MaxValue, int.MaxValue), this));
|
Game.world.Add(this.PlayerActor = new Actor("Player", new int2(int.MaxValue, int.MaxValue), this));
|
||||||
this.Index = index;
|
this.Index = index;
|
||||||
this.InternalName = "Multi{0}".F(index);
|
this.InternalName = "Multi{0}".F(index);
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ namespace OpenRa
|
|||||||
Sprite[,] sprites = new Sprite[128, 128];
|
Sprite[,] sprites = new Sprite[128, 128];
|
||||||
bool dirty = true;
|
bool dirty = true;
|
||||||
bool hasGPS = false;
|
bool hasGPS = false;
|
||||||
|
Player owner;
|
||||||
|
|
||||||
|
public Shroud(Player owner) { this.owner = owner; }
|
||||||
|
|
||||||
float gapOpaqueTicks = (int)(Rules.General.GapRegenInterval * 25 * 60);
|
float gapOpaqueTicks = (int)(Rules.General.GapRegenInterval * 25 * 60);
|
||||||
int[,] gapField = new int[128, 128];
|
int[,] gapField = new int[128, 128];
|
||||||
@@ -30,7 +33,7 @@ namespace OpenRa
|
|||||||
{
|
{
|
||||||
// Clear active flags
|
// Clear active flags
|
||||||
gapActive = new bool[128, 128];
|
gapActive = new bool[128, 128];
|
||||||
foreach (var a in Game.world.Actors.Where(a => a.traits.Contains<GeneratesGap>()))
|
foreach (var a in Game.world.Actors.Where(a => a.traits.Contains<GeneratesGap>() && owner != a.Owner))
|
||||||
{
|
{
|
||||||
foreach (var t in a.traits.Get<GeneratesGap>().GetShroudedTiles())
|
foreach (var t in a.traits.Get<GeneratesGap>().GetShroudedTiles())
|
||||||
gapActive[t.X, t.Y] = true;
|
gapActive[t.X, t.Y] = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user