mirror of
https://github.com/renorris/openfsd
synced 2026-03-22 14:35:36 +08:00
properly store sendfast state
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user