Merge pull request #6729 from atlimit8/OldLuaTurnFix
Fixes old Lua API Turn Activity crash
This commit is contained in:
@@ -16,7 +16,7 @@ Actor.Create = function(name, init)
|
||||
end
|
||||
|
||||
Actor.Turn = function(actor, facing)
|
||||
actor:QueueActivity(OpenRA.New("Turn", { { facing, "Int32" } }))
|
||||
actor:QueueActivity(OpenRA.New("Turn", { actor, { facing, "Int32" } }))
|
||||
end
|
||||
|
||||
Actor.Move = function(actor, location)
|
||||
@@ -24,14 +24,14 @@ Actor.Move = function(actor, location)
|
||||
end
|
||||
|
||||
Actor.MoveNear = function(actor, location, nearEnough)
|
||||
actor:QueueActivity(OpenRA.New("Move", { location, WRange.FromCells(nearEnough) }))
|
||||
actor:QueueActivity(OpenRA.New("Move", { actor, location, WRange.FromCells(nearEnough) }))
|
||||
end
|
||||
|
||||
Actor.ScriptedMove = function(actor, location)
|
||||
if Actor.HasTrait(actor, "Helicopter") then
|
||||
Internal.HeliFlyToPos(actor, Map.CenterOfCell(location))
|
||||
else
|
||||
actor:QueueActivity(OpenRA.New("Move", { location }))
|
||||
actor:QueueActivity(OpenRA.New("Move", { actor, location }))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user