Fix a pile of compiler warnings.
This commit is contained in:
@@ -34,9 +34,9 @@ namespace OpenRA.FileFormats
|
|||||||
throw new InvalidDataException("Not an Installshield package");
|
throw new InvalidDataException("Not an Installshield package");
|
||||||
|
|
||||||
reader.ReadBytes(8);
|
reader.ReadBytes(8);
|
||||||
var FileCount = reader.ReadUInt16();
|
/*var FileCount = */reader.ReadUInt16();
|
||||||
reader.ReadBytes(4);
|
reader.ReadBytes(4);
|
||||||
var ArchiveSize = reader.ReadUInt32();
|
/*var ArchiveSize = */reader.ReadUInt32();
|
||||||
reader.ReadBytes(19);
|
reader.ReadBytes(19);
|
||||||
var TOCAddress = reader.ReadInt32();
|
var TOCAddress = reader.ReadInt32();
|
||||||
reader.ReadBytes(4);
|
reader.ReadBytes(4);
|
||||||
@@ -55,7 +55,7 @@ namespace OpenRA.FileFormats
|
|||||||
var FileCount = reader.ReadUInt16();
|
var FileCount = reader.ReadUInt16();
|
||||||
var ChunkSize = reader.ReadUInt16();
|
var ChunkSize = reader.ReadUInt16();
|
||||||
var NameLength = reader.ReadUInt16();
|
var NameLength = reader.ReadUInt16();
|
||||||
var DirName = new String(reader.ReadChars(NameLength));
|
reader.ReadChars(NameLength); //var DirName = new String(reader.ReadChars(NameLength));
|
||||||
|
|
||||||
// Skip to the end of the chunk
|
// Skip to the end of the chunk
|
||||||
reader.ReadBytes(ChunkSize - NameLength - 6);
|
reader.ReadBytes(ChunkSize - NameLength - 6);
|
||||||
|
|||||||
@@ -8,18 +8,16 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
public ScaleInfo() { } /* only because we have other ctors */
|
public ScaleInfo() { } /* only because we have other ctors */
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new Scale(init.self, this); }
|
public object Create(ActorInitializer init) { return new Scale(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Scale : IRenderModifier
|
public class Scale : IRenderModifier
|
||||||
{
|
{
|
||||||
Actor self;
|
|
||||||
public ScaleInfo Info { get; protected set; }
|
public ScaleInfo Info { get; protected set; }
|
||||||
|
|
||||||
public Scale(Actor self, ScaleInfo info)
|
public Scale(ScaleInfo info)
|
||||||
{
|
{
|
||||||
this.Info = info;
|
this.Info = info;
|
||||||
this.self = self;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Renderable> ModifyRender(Actor self, IEnumerable<Renderable> r)
|
public IEnumerable<Renderable> ModifyRender(Actor self, IEnumerable<Renderable> r)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
{
|
{
|
||||||
public class LobbyDelegate : IWidgetDelegate
|
public class LobbyDelegate : IWidgetDelegate
|
||||||
{
|
{
|
||||||
Widget Players, LocalPlayerTemplate, RemotePlayerTemplate, EmptySlotTemplate, EmptySlotTemplateHost, EmptySpectatorSlotTemplateHost;
|
Widget Players, LocalPlayerTemplate, RemotePlayerTemplate, EmptySlotTemplate, EmptySlotTemplateHost;
|
||||||
|
|
||||||
Dictionary<string, string> CountryNames;
|
Dictionary<string, string> CountryNames;
|
||||||
string MapUid;
|
string MapUid;
|
||||||
@@ -44,7 +44,6 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
RemotePlayerTemplate = Players.GetWidget("TEMPLATE_REMOTE");
|
RemotePlayerTemplate = Players.GetWidget("TEMPLATE_REMOTE");
|
||||||
EmptySlotTemplate = Players.GetWidget("TEMPLATE_EMPTY");
|
EmptySlotTemplate = Players.GetWidget("TEMPLATE_EMPTY");
|
||||||
EmptySlotTemplateHost = Players.GetWidget("TEMPLATE_EMPTY_HOST");
|
EmptySlotTemplateHost = Players.GetWidget("TEMPLATE_EMPTY_HOST");
|
||||||
EmptySpectatorSlotTemplateHost = Players.GetWidget("TEMPLATE_EMPTY_SPECTATOR");
|
|
||||||
|
|
||||||
var mapPreview = lobby.GetWidget<MapPreviewWidget>("LOBBY_MAP_PREVIEW");
|
var mapPreview = lobby.GetWidget<MapPreviewWidget>("LOBBY_MAP_PREVIEW");
|
||||||
mapPreview.Map = () => Map;
|
mapPreview.Map = () => Map;
|
||||||
|
|||||||
@@ -54,10 +54,6 @@ namespace OpenRA.Mods.RA.Activities
|
|||||||
return (AllowMovement) ? Util.SequenceActivities(self.Trait<Mobile>().MoveWithinRange(Target, Range), this) : NextActivity;
|
return (AllowMovement) ? Util.SequenceActivities(self.Trait<Mobile>().MoveWithinRange(Target, Range), this) : NextActivity;
|
||||||
|
|
||||||
var desiredFacing = Util.GetFacing(Target.CenterLocation - self.CenterLocation, 0);
|
var desiredFacing = Util.GetFacing(Target.CenterLocation - self.CenterLocation, 0);
|
||||||
var renderUnit = self.TraitOrDefault<RenderUnit>();
|
|
||||||
var numDirs = (renderUnit != null)
|
|
||||||
? renderUnit.anim.CurrentSequence.Facings : 8;
|
|
||||||
|
|
||||||
if (facing.Facing != desiredFacing)
|
if (facing.Facing != desiredFacing)
|
||||||
return Util.SequenceActivities( new Turn( desiredFacing ), this );
|
return Util.SequenceActivities( new Turn( desiredFacing ), this );
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,6 @@ namespace OpenRA.Mods.RA
|
|||||||
return NextActivity;
|
return NextActivity;
|
||||||
|
|
||||||
var attack = self.Trait<AttackBase>();
|
var attack = self.Trait<AttackBase>();
|
||||||
var range = attack.GetMaximumRange();
|
|
||||||
|
|
||||||
currentTarget = attack.ScanForTarget(self, null);
|
currentTarget = attack.ScanForTarget(self, null);
|
||||||
if( currentTarget != null )
|
if( currentTarget != null )
|
||||||
inner = attack.GetAttackActivity( self, Target.FromActor(currentTarget), self.Info.Traits.Get<AutoTargetInfo>().AllowMovement );
|
inner = attack.GetAttackActivity( self, Target.FromActor(currentTarget), self.Info.Traits.Get<AutoTargetInfo>().AllowMovement );
|
||||||
|
|||||||
@@ -103,8 +103,6 @@ namespace OpenRA.Mods.RA.Buildings
|
|||||||
this.topLeft = init.Get<LocationInit,int2>();
|
this.topLeft = init.Get<LocationInit,int2>();
|
||||||
this.Info = self.Info.Traits.Get<BuildingInfo>();
|
this.Info = self.Info.Traits.Get<BuildingInfo>();
|
||||||
this.PlayerPower = init.self.Owner.PlayerActor.Trait<PowerManager>();
|
this.PlayerPower = init.self.Owner.PlayerActor.Trait<PowerManager>();
|
||||||
|
|
||||||
var uim = init.world.WorldActor.Trait<UnitInfluence>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetPowerUsage()
|
public int GetPowerUsage()
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
class Husk : IOccupySpace, IFacing
|
class Husk : IOccupySpace, IFacing
|
||||||
{
|
{
|
||||||
Actor self;
|
|
||||||
[Sync]
|
[Sync]
|
||||||
int2 location;
|
int2 location;
|
||||||
|
|
||||||
@@ -31,7 +30,6 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
public Husk(ActorInitializer init)
|
public Husk(ActorInitializer init)
|
||||||
{
|
{
|
||||||
this.self = init.self;
|
|
||||||
this.location = init.Get<LocationInit,int2>();
|
this.location = init.Get<LocationInit,int2>();
|
||||||
this.Facing = init.Contains<FacingInit>() ? init.Get<FacingInit,int>() : 128;
|
this.Facing = init.Contains<FacingInit>() ? init.Get<FacingInit,int>() : 128;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
if (Captured && Permanent) return; // Permanent capture
|
if (Captured && Permanent) return; // Permanent capture
|
||||||
|
|
||||||
var playersNear = CountPlayersNear(self, OriginalOwner, Range);
|
//var playersNear = CountPlayersNear(self, OriginalOwner, Range);
|
||||||
|
|
||||||
if (!Captured)
|
if (!Captured)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user