properly store sendfast state

This commit is contained in:
Reese Norris
2025-05-25 14:19:08 -07:00
parent 7d17066289
commit bc7a37e490

View File

@@ -167,10 +167,12 @@ func (s *Server) handlePilotPosition(client *Client, packet []byte) {
// Check if we need to update the sendfast state
if client.sendFastEnabled {
if (client.closestVelocityClientDistance / 1852.0) > 5.0 { // 5.0 nautical miles
client.sendFastEnabled = false
sendDisableSendFastPacket(client)
}
} else {
if (client.closestVelocityClientDistance / 1852.0) < 5.0 { // 5.0 nautical miles
client.sendFastEnabled = true
sendEnableSendFastPacket(client)
}
}