From 5167533c6d9a29a5bab13f644b386179c80fad7e Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Thu, 17 Oct 2024 00:14:39 +0200 Subject: [PATCH] Ignore GPS messages from other dimension refs #2 --- src/kernel/gps/GPS.hx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/kernel/gps/GPS.hx b/src/kernel/gps/GPS.hx index 04d8e16..fe4282d 100644 --- a/src/kernel/gps/GPS.hx +++ b/src/kernel/gps/GPS.hx @@ -115,7 +115,12 @@ class GPS { } @:allow(kernel.net.Net) - private static function handlePackage(pack:Package, dist:Float, iface:INetworkInterface) { + private static function handlePackage(pack:Package, dist:Null, iface:INetworkInterface) { + if (dist == null) { + // Message comes from another dimension and has no distance. + return; + } + switch (pack.type) { case GPSRequest: if (!shouldRespond)