Merge pull request #5988 from pchote/shellmap-paradrop
Fix scripted paradrops.
This commit is contained in:
@@ -57,7 +57,9 @@ namespace OpenRA.Mods.RA.Scripting
|
|||||||
public void Paradrop(CPos cell)
|
public void Paradrop(CPos cell)
|
||||||
{
|
{
|
||||||
paradrop.SetLZ(cell, true);
|
paradrop.SetLZ(cell, true);
|
||||||
self.QueueActivity(new FlyAttack(Target.FromCell(self.World, cell)));
|
self.QueueActivity(new Fly(self, Target.FromCell(self.World, cell)));
|
||||||
|
self.QueueActivity(new FlyOffMap());
|
||||||
|
self.QueueActivity(new RemoveSelf());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,8 +16,10 @@ SupportPowers.Paradrop = function(owner, planeName, passengerNames, enterLocatio
|
|||||||
local facing = { Map.GetFacing(CPos.op_Subtraction(dropLocation, enterLocation), 0), "Int32" }
|
local facing = { Map.GetFacing(CPos.op_Subtraction(dropLocation, enterLocation), 0), "Int32" }
|
||||||
local center = WPos.op_Addition(Map.CenterOfCell(enterLocation), WVec.New(0, 0, Rules.InitialAltitude(planeName)))
|
local center = WPos.op_Addition(Map.CenterOfCell(enterLocation), WVec.New(0, 0, Rules.InitialAltitude(planeName)))
|
||||||
local plane = Actor.Create(planeName, { Location = enterLocation, Owner = owner, Facing = facing, CenterPosition = center })
|
local plane = Actor.Create(planeName, { Location = enterLocation, Owner = owner, Facing = facing, CenterPosition = center })
|
||||||
Actor.FlyAttackCell(plane, dropLocation)
|
Actor.Fly(plane, Map.CenterOfCell(dropLocation))
|
||||||
Actor.Trait(plane, "ParaDrop"):SetLZ(dropLocation, true)
|
Actor.Trait(plane, "ParaDrop"):SetLZ(dropLocation, true)
|
||||||
|
Actor.FlyOffMap(plane)
|
||||||
|
Actor.RemoveSelf(plane)
|
||||||
local cargo = Actor.Trait(plane, "Cargo")
|
local cargo = Actor.Trait(plane, "Cargo")
|
||||||
local passengers = { }
|
local passengers = { }
|
||||||
for i, passengerName in ipairs(passengerNames) do
|
for i, passengerName in ipairs(passengerNames) do
|
||||||
|
|||||||
Reference in New Issue
Block a user