Fix breakage of the old Lua API due to recent changes
Specifically, the CPos::CenterPosition -> Map::CenterOfCell rename (#5758), as well as the additional argument to Paradrop::SetLZ (#5695).
This commit is contained in:
@@ -2,7 +2,7 @@ Reinforcements = { }
|
||||
|
||||
Reinforcements.Insert = function(owner, transportName, passengerNames, enterPath, exitPath)
|
||||
local facing = { Map.GetFacing(CPos.op_Subtraction(enterPath[2], enterPath[1]), 0), "Int32" }
|
||||
local center = WPos.op_Addition(enterPath[1].CenterPosition, WVec.New(0, 0, Rules.InitialAltitude(transportName)))
|
||||
local center = WPos.op_Addition(Map.CenterOfCell(enterPath[1]), WVec.New(0, 0, Rules.InitialAltitude(transportName)))
|
||||
local transport = Actor.Create(transportName, { Owner = owner, Location = enterPath[1], CenterPosition = center, Facing = facing })
|
||||
local cargo = Actor.Trait(transport, "Cargo")
|
||||
local passengers = { }
|
||||
@@ -24,7 +24,7 @@ end
|
||||
|
||||
Reinforcements.Extract = function(owner, transportName, passengerNames, enterPath, exitPath)
|
||||
local facing = { Map.GetFacing(CPos.op_Subtraction(enterPath[2], enterPath[1]), 0), "Int32" }
|
||||
local center = WPos.op_Addition(enterPath[1].CenterPosition, WVec.New(0, 0, Rules.InitialAltitude(transportName)))
|
||||
local center = WPos.op_Addition(Map.CenterOfCell(enterPath[1]), WVec.New(0, 0, Rules.InitialAltitude(transportName)))
|
||||
local transport = Actor.Create(transportName, { Owner = owner, Location = enterPath[1], CenterPosition = center, Facing = facing })
|
||||
local cargo = Actor.Trait(transport, "Cargo")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user