Amount of time left for an entity to burn?

How to get the amount of time left before the fire extinguishes itself on a specific entity?

AFAIK there is no way:saddowns:


[lua]local meta = FindMetaTable(“Entity”)
local Ignite = meta.Ignite
function meta:Ignite(…)
local dur = …
self.timeOnFire = dur && !self:IsOnFire() && CurTime() +dur || self.timeOnFire
return Ignite(self,…)

local Extinguish = meta.Extinguish
function meta:Extinguish(…)
self.timeOnFire = nil
return Extinguish(self,…)

function meta:TimeUntilExtinguished()
return self:IsOnFire() && self.timeOnFire && math.max(self.timeOnFire -CurTime(),0) || 0

Only works if the entity was ignited directly by the Ignite function.

Thank you.