Add support for naval logistics

This commit is contained in:
acrojason
2020-12-31 10:15:32 -08:00
parent 4b8b13dd68
commit 1b80d68f50
7 changed files with 398 additions and 118 deletions

View File

@@ -100,7 +100,12 @@ do -- CARGO_UNIT
-- Respawn the group...
if self.CargoObject then
self.CargoObject:ReSpawnAt( FromPointVec2, CargoDeployHeading )
if CargoCarrier:IsShip() then
-- If CargoCarrier is a ship, we don't want to spawn the units in the water next to the boat. Use destination coord instead.
self.CargoObject:ReSpawnAt( ToPointVec2, CargoDeployHeading )
else
self.CargoObject:ReSpawnAt( FromPointVec2, CargoDeployHeading )
end
self:F( { "CargoUnits:", self.CargoObject:GetGroup():GetName() } )
self.CargoCarrier = nil