-- Copyright ©2022 by Todd Hundersmarck (ThundR)
-- All Rights Reserved
THRotator = {} local THRotator_mt = Class(THRotator, Rotator) local function runScript() local globalEnv = g_thMain:getGlobalEnv() globalEnv.THRotator = THRotator g_thMain:hookFunction("Rotator", "update", THRotator) g_thMain:hookFunction("Rotator", "delete", THRotator) end function THRotator:onCreate(id, ...) if entityExists(id) then return THRotator:superClass().onCreate(self, id, ...) end end function THRotator:hook_update(superFunc, dt, ...) if entityExists(self.me) then return superFunc(self, dt, ...) end end function THRotator:hook_delete(superFunc, ...) g_currentMission:removeUpdateable(self) return superFunc(self, ...) end runScript()