AI_CAP - more fallout from the dead units in the API

This commit is contained in:
Applevangelist 2022-05-05 17:40:00 +02:00
parent 07d761941a
commit 69eb920173

View File

@ -428,6 +428,10 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To )
--- Calculate the current route point.
local CurrentVec2 = self.Controllable:GetVec2()
if not CurrentVec2 then -- flight dead at this point
return self
end
--DONE: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )