From 5ee3ed4f7aa4719e1e5b9fad81b2330ed2ba424d Mon Sep 17 00:00:00 2001 From: Azmoria <65363489+Azmoria@users.noreply.github.com> Date: Sun, 17 Sep 2023 10:53:10 -0400 Subject: [PATCH] Fix - make sure walls are drawn before bucket fill drawings. --- Fog.js | 3 ++- MessageBroker.js | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Fog.js b/Fog.js index f14f4f8a3..2afbd4eaa 100644 --- a/Fog.js +++ b/Fog.js @@ -898,8 +898,9 @@ function reset_canvas() { delete window.lightAuraClipPolygon; delete window.lineOfSightPolygons; - redraw_drawings(); redraw_light_walls(); + redraw_drawings(); + redraw_drawn_light(); redraw_light(); redraw_fog(); redraw_text(); diff --git a/MessageBroker.js b/MessageBroker.js index af60d2245..dab4664fa 100644 --- a/MessageBroker.js +++ b/MessageBroker.js @@ -547,18 +547,20 @@ class MessageBroker { if (msg.eventType == "custom/myVTT/drawing") { window.DRAWINGS.push(msg.data); + redraw_light_walls(); + redraw_drawn_light(); redraw_drawings(); redraw_text(); - redraw_light_walls(); await redraw_light(); check_token_visibility(); } if(msg.eventType=="custom/myVTT/drawdata"){ window.DRAWINGS=msg.data; + redraw_light_walls(); + redraw_drawn_light(); redraw_drawings(); redraw_text(); - redraw_light_walls(); await redraw_light(); check_token_visibility(); } @@ -1356,6 +1358,7 @@ class MessageBroker { if(msg.data.id == window.CURRENT_SCENE_DATA.id){ // incase another map was loaded before we get uvtt data back + if (data.fog_of_war == 1) { window.FOG_OF_WAR = true; window.REVEALED = data.reveals;