Ignore GPS messages from other dimension

refs #2
This commit is contained in:
Niklas Kapelle 2024-10-17 00:14:39 +02:00
parent aac527ae89
commit 5167533c6d
Signed by: niklas
GPG Key ID: 4EB651B36D841D16

View File

@ -115,7 +115,12 @@ class GPS {
}
@:allow(kernel.net.Net)
private static function handlePackage(pack:Package<Noise>, dist:Float, iface:INetworkInterface) {
private static function handlePackage(pack:Package<Noise>, dist:Null<Float>, iface:INetworkInterface) {
if (dist == null) {
// Message comes from another dimension and has no distance.
return;
}
switch (pack.type) {
case GPSRequest:
if (!shouldRespond)