bugfix: sometimes perspective returns null, I assume because object culled?

This commit is contained in:
Louis Hong
2024-11-21 11:37:10 -08:00
parent 29e3a7189d
commit 148ee94347

View File

@@ -271,6 +271,11 @@ public class FoundryOverlay3D extends Overlay
stageLoc = new LocalPoint(stageLoc.getX(), stageLoc.getY()); stageLoc = new LocalPoint(stageLoc.getX(), stageLoc.getY());
Point pos = Perspective.getCanvasTextLocation(client, graphics, stageLoc, text, 50); Point pos = Perspective.getCanvasTextLocation(client, graphics, stageLoc, text, 50);
if (pos == null)
{
return;
}
Color color = config.lavaWaterfallColour(); Color color = config.lavaWaterfallColour();
OverlayUtil.renderTextLocation(graphics, pos, text, color); OverlayUtil.renderTextLocation(graphics, pos, text, color);