From 7c486e896a106595f64a15fd3aa5717fa149b59c Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Fri, 23 Sep 2022 22:30:22 +0300 Subject: [PATCH] drawfunction fixes (this might be stable now??) --- main.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.xml b/main.xml index 2c1c001..e5e38eb 100644 --- a/main.xml +++ b/main.xml @@ -241,11 +241,13 @@ GAMESTATE:ApplyModifiers('clearall') + local specialActorFrames = {} -- ones defined specifically; here for drawfunction jank + function setDrawFunction(frame, func) frame:SetDrawFunction(function() for i = 1, frame:GetNumChildren() do local a = frame:GetChildAt(i - 1) - if a.fov then -- actorframe + if specialActorFrames[a] == false then a:Draw() end end @@ -362,7 +364,7 @@ self:SetDrawFunction(function() for i = 1, self:GetNumChildren() do local a = self:GetChildAt(i - 1) - if a.fov then -- actorframe + if specialActorFrames[a] == false then a:Draw() end end @@ -371,6 +373,9 @@ if currentPath.init then currentPath.init(self) currentPath.init = nil + specialActorFrames[self] = true + else + specialActorFrames[self] = false end end