drawfunction fixes (this might be stable now??)
This commit is contained in:
parent
e6c2867aed
commit
7c486e896a
9
main.xml
9
main.xml
|
@ -241,11 +241,13 @@
|
||||||
|
|
||||||
GAMESTATE:ApplyModifiers('clearall')
|
GAMESTATE:ApplyModifiers('clearall')
|
||||||
|
|
||||||
|
local specialActorFrames = {} -- ones defined specifically; here for drawfunction jank
|
||||||
|
|
||||||
function setDrawFunction(frame, func)
|
function setDrawFunction(frame, func)
|
||||||
frame:SetDrawFunction(function()
|
frame:SetDrawFunction(function()
|
||||||
for i = 1, frame:GetNumChildren() do
|
for i = 1, frame:GetNumChildren() do
|
||||||
local a = frame:GetChildAt(i - 1)
|
local a = frame:GetChildAt(i - 1)
|
||||||
if a.fov then -- actorframe
|
if specialActorFrames[a] == false then
|
||||||
a:Draw()
|
a:Draw()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -362,7 +364,7 @@
|
||||||
self:SetDrawFunction(function()
|
self:SetDrawFunction(function()
|
||||||
for i = 1, self:GetNumChildren() do
|
for i = 1, self:GetNumChildren() do
|
||||||
local a = self:GetChildAt(i - 1)
|
local a = self:GetChildAt(i - 1)
|
||||||
if a.fov then -- actorframe
|
if specialActorFrames[a] == false then
|
||||||
a:Draw()
|
a:Draw()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -371,6 +373,9 @@
|
||||||
if currentPath.init then
|
if currentPath.init then
|
||||||
currentPath.init(self)
|
currentPath.init(self)
|
||||||
currentPath.init = nil
|
currentPath.init = nil
|
||||||
|
specialActorFrames[self] = true
|
||||||
|
else
|
||||||
|
specialActorFrames[self] = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue