add IHasLocation
This commit is contained in:
@@ -50,7 +50,7 @@ namespace OpenRA.Mods.Cnc
|
||||
new AltitudeInit( Rules.Info["c17"].Traits.Get<PlaneInfo>().CruiseAltitude ),
|
||||
});
|
||||
|
||||
a.QueueActivity(new Fly(self.Location + new int2(6,0)));
|
||||
a.QueueActivity(Fly.ToCell(self.Location + new int2(6,0)));
|
||||
a.QueueActivity(new Land(Target.FromActor(self)));
|
||||
a.QueueActivity(new CallFunc(() =>
|
||||
{
|
||||
@@ -60,7 +60,7 @@ namespace OpenRA.Mods.Cnc
|
||||
rb.PlayCustomAnimRepeating(self, "idle");
|
||||
self.World.AddFrameEndTask(ww => DoProduction(self, producee, exit));
|
||||
}));
|
||||
a.QueueActivity(new Fly(endPos));
|
||||
a.QueueActivity(Fly.ToCell(endPos));
|
||||
a.QueueActivity(new RemoveSelf());
|
||||
});
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Cnc
|
||||
public IEnumerable<Renderable> ModifyRender(Actor self, IEnumerable<Renderable> r)
|
||||
{
|
||||
foreach (var c in cargo.Passengers)
|
||||
c.CenterLocation = self.CenterLocation;
|
||||
c.Trait<ITeleportable>().SetPxPosition( c, self.Trait<IHasLocation>().PxPosition );
|
||||
|
||||
return r.Concat(cargo.Passengers.SelectMany(a => a.Render()));
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ namespace OpenRA.Mods.Cnc
|
||||
bool preventDock = false;
|
||||
public void OnDock(Actor self, Actor harv, DeliverResources dockOrder)
|
||||
{
|
||||
float2 startDock = harv.CenterLocation;
|
||||
float2 endDock = self.CenterLocation + new float2(-15,8);
|
||||
int2 startDock = harv.Trait<IHasLocation>().PxPosition;
|
||||
int2 endDock = self.Trait<IHasLocation>().PxPosition + new int2(-15,8);
|
||||
var harvester = harv.Trait<Harvester>();
|
||||
|
||||
harv.QueueActivity( new Turn(112) );
|
||||
|
||||
Reference in New Issue
Block a user