feat: only stream portals within 12 meters of the player
This commit is contained in:
parent
269964e3d3
commit
98c43c4c61
2 changed files with 6 additions and 0 deletions
|
|
@ -804,6 +804,12 @@ namespace MosswartMassacre
|
||||||
var decalCoords = portal.Coordinates();
|
var decalCoords = portal.Coordinates();
|
||||||
if (decalCoords == null) return;
|
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";
|
const string fmt = "F7";
|
||||||
string ns = decalCoords.NorthSouth.ToString(fmt, CultureInfo.InvariantCulture);
|
string ns = decalCoords.NorthSouth.ToString(fmt, CultureInfo.InvariantCulture);
|
||||||
string ew = decalCoords.EastWest.ToString(fmt, CultureInfo.InvariantCulture);
|
string ew = decalCoords.EastWest.ToString(fmt, CultureInfo.InvariantCulture);
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue