only do velocity distance calculation for relevant clients

This commit is contained in:
Reese Norris
2025-05-25 14:27:07 -07:00
parent bc7a37e490
commit f63d89eb3e
2 changed files with 12 additions and 10 deletions

View File

@@ -98,7 +98,7 @@ func (p *postOffice) search(client *Client, callback func(recipient *Client) boo
return true // Ignore self
}
if foundClient.protoRevision == 101 {
if !client.isAtc && client.protoRevision == 101 && foundClient.protoRevision == 101 {
clientLatLon := client.latLon()
foundClientLatLon := foundClient.latLon()
dist := distance(clientLatLon[0], clientLatLon[1], foundClientLatLon[0], foundClientLatLon[1])