feat: only stream portals within 12 meters of the player

This commit is contained in:
Erik 2026-03-30 22:26:19 +02:00
parent 269964e3d3
commit 98c43c4c61
2 changed files with 6 additions and 0 deletions

View file

@ -804,6 +804,12 @@ namespace MosswartMassacre
var decalCoords = portal.Coordinates();
if (decalCoords == null) return;
// Only report portals within 12 meters of the player
var portalPos = new Coordinates(decalCoords.EastWest, decalCoords.NorthSouth);
var playerPos = Coordinates.Me;
double dist = playerPos.DistanceToFlat(portalPos);
if (dist > 12.0) return;
const string fmt = "F7";
string ns = decalCoords.NorthSouth.ToString(fmt, CultureInfo.InvariantCulture);
string ew = decalCoords.EastWest.ToString(fmt, CultureInfo.InvariantCulture);