Fix crash in _WaypointFunction due to self:T
Increased version number to 2.0.3
This commit is contained in:
funkyfranky 2017-12-30 15:03:37 +01:00
parent b52b5b78c9
commit 282bf8bd07

View File

@ -465,7 +465,7 @@ RAT.id="RAT | "
--- RAT version. --- RAT version.
-- @field #string version -- @field #string version
RAT.version="2.0.2" RAT.version="2.0.3"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ -3526,12 +3526,12 @@ function RAT._WaypointFunction(group, rat, wp)
if wp==WPfinal then if wp==WPfinal then
text=string.format("Flight %s arrived at final destination %s.", group:GetName(), destination) text=string.format("Flight %s arrived at final destination %s.", group:GetName(), destination)
MESSAGE:New(text, 10):ToAllIf(rat.reportstatus) MESSAGE:New(text, 10):ToAllIf(rat.reportstatus)
self:T(RAT.id..text) BASE.T(rat, RAT.id..text)
if landing==RAT.wp.air then if landing==RAT.wp.air then
text=string.format("Activating despawn switch for flight %s! Group will be detroyed soon.", group:GetName()) text=string.format("Activating despawn switch for flight %s! Group will be detroyed soon.", group:GetName())
MESSAGE:New(text, 30):ToAllIf(rat.Debug) MESSAGE:New(text, 30):ToAllIf(rat.Debug)
self:T(RAT.id..text) BASE.T(rat, RAT.id..text)
-- Enable despawn switch. Next time the status function is called, the aircraft will be despawned. -- Enable despawn switch. Next time the status function is called, the aircraft will be despawned.
rat.ratcraft[sdx].despawnme=true rat.ratcraft[sdx].despawnme=true
end end