diff --git a/src/main/java/net/rptools/maptool/client/ui/zone/gdx/GdxRenderer.java b/src/main/java/net/rptools/maptool/client/ui/zone/gdx/GdxRenderer.java index a342aed42c..eddd6d69ce 100644 --- a/src/main/java/net/rptools/maptool/client/ui/zone/gdx/GdxRenderer.java +++ b/src/main/java/net/rptools/maptool/client/ui/zone/gdx/GdxRenderer.java @@ -1670,9 +1670,10 @@ private void fillViewportWith(ZoneCache.GdxPaint paint) { // startY = (((int) startY) / texture.getHeight()) * texture.getHeight() - texture.getHeight(); var vertices = new float[] { - startX, startY, startX, startY + h, startX + w, startY + h, startX + w, startY, + startX, startY, startX, startY + h, startX + w, startY + h, startX + w, startY }; - var indices = new short[] {0, 1, 2, 0, 2, 4}; + + var indices = new short[] {1, 0, 3, 3, 2, 1}; var polySprite = new PolygonSprite(new PolygonRegion(paint.textureRegion(), vertices, indices)); polySprite.setColor(paint.color()); @@ -3187,24 +3188,25 @@ private void highlightCell(ZonePoint zp, TextureRegion image, float size) { @Subscribe void onZoneActivated(ZoneActivated event) { - if (!initialized) return; - - renderZone = false; - - fogX = null; - fogY = null; - - var newZone = event.zone(); - zoneCache = new ZoneCache(newZone, atlas); - lineTemplateDrawer.setZoneCache(zoneCache); - lineCellTemplateDrawer.setZoneCache(zoneCache); - radiusTemplateDrawer.setZoneCache(zoneCache); - burstTemplateDrawer.setZoneCache(zoneCache); - coneTemplateDrawer.setZoneCache(zoneCache); - blastTemplateDrawer.setZoneCache(zoneCache); - radiusCellTemplateDrawer.setZoneCache(zoneCache); - shapeDrawableDrawer.setZoneCache(zoneCache); - renderZone = true; + Gdx.app.postRunnable( + () -> { + renderZone = false; + + fogX = null; + fogY = null; + + var newZone = event.zone(); + zoneCache = new ZoneCache(newZone, atlas); + lineTemplateDrawer.setZoneCache(zoneCache); + lineCellTemplateDrawer.setZoneCache(zoneCache); + radiusTemplateDrawer.setZoneCache(zoneCache); + burstTemplateDrawer.setZoneCache(zoneCache); + coneTemplateDrawer.setZoneCache(zoneCache); + blastTemplateDrawer.setZoneCache(zoneCache); + radiusCellTemplateDrawer.setZoneCache(zoneCache); + shapeDrawableDrawer.setZoneCache(zoneCache); + renderZone = true; + }); } public void setScale(Scale scale) {