Squelch almost all compile errors
This commit is contained in:
@@ -157,8 +157,9 @@ namespace OpenRA.FileFormats
|
|||||||
{
|
{
|
||||||
using (var dataStream = Package.GetContent("map.bin"))
|
using (var dataStream = Package.GetContent("map.bin"))
|
||||||
{
|
{
|
||||||
|
//byte version =
|
||||||
|
ReadByte(dataStream);
|
||||||
// Load header info
|
// Load header info
|
||||||
byte version = ReadByte(dataStream);
|
|
||||||
var width = ReadWord(dataStream);
|
var width = ReadWord(dataStream);
|
||||||
var height = ReadWord(dataStream);
|
var height = ReadWord(dataStream);
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace OpenRA
|
|||||||
public class PathSearch
|
public class PathSearch
|
||||||
{
|
{
|
||||||
World world;
|
World world;
|
||||||
ResourceLayer resources;
|
//ResourceLayer resources;
|
||||||
public CellInfo[ , ] cellInfo;
|
public CellInfo[ , ] cellInfo;
|
||||||
public PriorityQueue<PathDistance> queue;
|
public PriorityQueue<PathDistance> queue;
|
||||||
public Func<int2, float> heuristic;
|
public Func<int2, float> heuristic;
|
||||||
@@ -51,7 +51,7 @@ namespace OpenRA
|
|||||||
|
|
||||||
buildingInfluence = world.WorldActor.traits.Get<BuildingInfluence>();
|
buildingInfluence = world.WorldActor.traits.Get<BuildingInfluence>();
|
||||||
unitInfluence = world.WorldActor.traits.Get<UnitInfluence>();
|
unitInfluence = world.WorldActor.traits.Get<UnitInfluence>();
|
||||||
resources = world.WorldActor.traits.Get<ResourceLayer>();
|
//resources = world.WorldActor.traits.Get<ResourceLayer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public PathSearch InReverse()
|
public PathSearch InReverse()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||||
* This file is part of OpenRA.
|
* This file is part of OpenRA.
|
||||||
@@ -40,7 +40,7 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
muzzleFlash = new Animation(render.GetImage(self), () => unit.Facing);
|
muzzleFlash = new Animation(render.GetImage(self), () => unit.Facing);
|
||||||
muzzleFlash.Play("muzzle");
|
muzzleFlash.Play("muzzle");
|
||||||
var len = muzzleFlash.CurrentSequence.Length;
|
//var len = muzzleFlash.CurrentSequence.Length;
|
||||||
|
|
||||||
render.anims.Add("muzzle", new RenderSimple.AnimationWithOffset(
|
render.anims.Add("muzzle", new RenderSimple.AnimationWithOffset(
|
||||||
muzzleFlash,
|
muzzleFlash,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
public void Tick(Actor self)
|
public void Tick(Actor self)
|
||||||
{
|
{
|
||||||
var info = self.Info.Traits.Get<ConquestVictoryConditionsInfo>();
|
//var info = self.Info.Traits.Get<ConquestVictoryConditionsInfo>();
|
||||||
var hasAnything = self.World.Queries.OwnedBy[self.Owner]
|
var hasAnything = self.World.Queries.OwnedBy[self.Owner]
|
||||||
.WithTrait<MustBeDestroyed>().Any();
|
.WithTrait<MustBeDestroyed>().Any();
|
||||||
|
|
||||||
|
|||||||
@@ -33,14 +33,14 @@ namespace OpenRA.Traits
|
|||||||
{
|
{
|
||||||
string seqName;
|
string seqName;
|
||||||
int damageStates;
|
int damageStates;
|
||||||
Actor self;
|
//Actor self;
|
||||||
int adjacentWalls = 0;
|
int adjacentWalls = 0;
|
||||||
|
|
||||||
public RenderBuildingWall(Actor self)
|
public RenderBuildingWall(Actor self)
|
||||||
: base(self)
|
: base(self)
|
||||||
{
|
{
|
||||||
seqName = "idle";
|
seqName = "idle";
|
||||||
this.self = self;
|
//this.self = self;
|
||||||
this.damageStates = self.Info.Traits.Get<RenderBuildingWallInfo>().DamageStates;
|
this.damageStates = self.Info.Traits.Get<RenderBuildingWallInfo>().DamageStates;
|
||||||
|
|
||||||
anim.PlayFetchIndex(seqName, () => adjacentWalls);
|
anim.PlayFetchIndex(seqName, () => adjacentWalls);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||||
* This file is part of OpenRA.
|
* This file is part of OpenRA.
|
||||||
@@ -44,7 +44,7 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
if (order.OrderString == "Enter")
|
if (order.OrderString == "Enter")
|
||||||
{
|
{
|
||||||
var res = order.TargetActor.traits.GetOrDefault<Reservable>();
|
//var res = order.TargetActor.traits.GetOrDefault<Reservable>();
|
||||||
var rp = order.TargetActor.traits.GetOrDefault<RallyPoint>();
|
var rp = order.TargetActor.traits.GetOrDefault<RallyPoint>();
|
||||||
|
|
||||||
self.CancelActivity();
|
self.CancelActivity();
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ namespace OpenRA.Widgets
|
|||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
string tooltipItem = null;
|
string tooltipItem = null;
|
||||||
float2 tooltipPos = float2.Zero;
|
//float2 tooltipPos = float2.Zero;
|
||||||
foreach (var item in allBuildables)
|
foreach (var item in allBuildables)
|
||||||
{
|
{
|
||||||
var rect = new RectangleF(origin.X + x * 64, origin.Y + 48 * y, 64, 48);
|
var rect = new RectangleF(origin.X + x * 64, origin.Y + 48 * y, 64, 48);
|
||||||
@@ -235,7 +235,7 @@ namespace OpenRA.Widgets
|
|||||||
if (rect.Contains(Game.chrome.lastMousePos.ToPoint()))
|
if (rect.Contains(Game.chrome.lastMousePos.ToPoint()))
|
||||||
{
|
{
|
||||||
tooltipItem = item.Name;
|
tooltipItem = item.Name;
|
||||||
tooltipPos = drawPos;
|
//tooltipPos = drawPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
var overlayPos = drawPos + new float2((64 - ready.Image.size.X) / 2, 2);
|
var overlayPos = drawPos + new float2((64 - ready.Image.size.X) / 2, 2);
|
||||||
@@ -470,7 +470,7 @@ namespace OpenRA.Widgets
|
|||||||
void DrawProductionTooltip(World world, string unit, int2 pos)
|
void DrawProductionTooltip(World world, string unit, int2 pos)
|
||||||
{
|
{
|
||||||
pos.Y += 15;
|
pos.Y += 15;
|
||||||
var chromeCollection = "chrome-" + world.LocalPlayer.Country.Race;
|
//var chromeCollection = "chrome-" + world.LocalPlayer.Country.Race;
|
||||||
|
|
||||||
var p = pos.ToFloat2() - new float2(297, -3);
|
var p = pos.ToFloat2() - new float2(297, -3);
|
||||||
|
|
||||||
@@ -534,8 +534,8 @@ namespace OpenRA.Widgets
|
|||||||
int size = p.visibleTabs.Count();
|
int size = p.visibleTabs.Count();
|
||||||
if (size > 0)
|
if (size > 0)
|
||||||
{
|
{
|
||||||
string last = p.visibleTabs.Last();
|
//string last = p.visibleTabs.Last();
|
||||||
string first = p.visibleTabs.First();
|
//string first = p.visibleTabs.First();
|
||||||
int current = p.visibleTabs.IndexOf(p.currentTab);
|
int current = p.visibleTabs.IndexOf(p.currentTab);
|
||||||
if (!shift)
|
if (!shift)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -138,15 +138,15 @@ namespace OpenRA
|
|||||||
|
|
||||||
public void Tick()
|
public void Tick()
|
||||||
{
|
{
|
||||||
var sw = new Stopwatch();
|
//var sw = new Stopwatch();
|
||||||
|
|
||||||
foreach (var a in actors) a.Tick();
|
foreach (var a in actors) a.Tick();
|
||||||
|
|
||||||
Queries.WithTraitMultiple<ITick>().Do( x =>
|
Queries.WithTraitMultiple<ITick>().Do( x =>
|
||||||
{
|
{
|
||||||
var t = sw.ElapsedTime();
|
//var t = sw.ElapsedTime();
|
||||||
x.Trait.Tick( x.Actor );
|
x.Trait.Tick( x.Actor );
|
||||||
var dt = sw.ElapsedTime() - t;
|
//var dt = sw.ElapsedTime() - t;
|
||||||
// if( dt > 0.001 )
|
// if( dt > 0.001 )
|
||||||
// Log.Write( "expensive tick: {0}->{1}", x.Actor.Info.Name, x.Trait.GetType() );
|
// Log.Write( "expensive tick: {0}->{1}", x.Actor.Info.Name, x.Trait.GetType() );
|
||||||
} );
|
} );
|
||||||
|
|||||||
Reference in New Issue
Block a user