trim some crap out of Contrail
This commit is contained in:
@@ -29,18 +29,16 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
class Contrail : ITick, IPostRender
|
class Contrail : ITick, IPostRender
|
||||||
{
|
{
|
||||||
ContrailInfo Info = null;
|
Turret contrailTurret = null;
|
||||||
Turret ContrailTurret = null;
|
|
||||||
ContrailHistory history;
|
ContrailHistory history;
|
||||||
IFacing facing;
|
IFacing facing;
|
||||||
IMove move;
|
IMove move;
|
||||||
|
|
||||||
public Contrail(Actor self, ContrailInfo info)
|
public Contrail(Actor self, ContrailInfo info)
|
||||||
{
|
{
|
||||||
Info = info;
|
contrailTurret = new Turret(info.ContrailOffset);
|
||||||
ContrailTurret = new Turret(Info.ContrailOffset);
|
history = new ContrailHistory(info.TrailLength,
|
||||||
history = new ContrailHistory(Info.TrailLength,
|
info.UsePlayerColor ? ContrailHistory.ChooseColor(self) : info.Color);
|
||||||
Info.UsePlayerColor ? ContrailHistory.ChooseColor(self) : Info.Color);
|
|
||||||
facing = self.Trait<IFacing>();
|
facing = self.Trait<IFacing>();
|
||||||
move = self.Trait<IMove>();
|
move = self.Trait<IMove>();
|
||||||
}
|
}
|
||||||
@@ -48,7 +46,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public void Tick(Actor self)
|
public void Tick(Actor self)
|
||||||
{
|
{
|
||||||
history.Tick(self.CenterLocation - new int2(0, move.Altitude)
|
history.Tick(self.CenterLocation - new int2(0, move.Altitude)
|
||||||
- Combat.GetTurretPosition(self, facing, ContrailTurret));
|
- Combat.GetTurretPosition(self, facing, contrailTurret));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RenderAfterWorld(WorldRenderer wr, Actor self) { history.Render(self); }
|
public void RenderAfterWorld(WorldRenderer wr, Actor self) { history.Render(self); }
|
||||||
|
|||||||
Reference in New Issue
Block a user