mirror of
https://github.com/bdnugget/nbnet.git
synced 2026-11-07 05:27:27 +00:00
Merge pull request #65 from web3gamedev/master
cast jitter to double before dividing by 1000
This commit is contained in:
1 file changed
+1
-1
@@ -5885,7 +5885,7 @@ int NBN_PacketSimulator_EnqueuePacket(NBN_PacketSimulator *packet_simulator, NBN
|
||||
|
||||
NBN_PacketSimulatorEntry *entry = (NBN_PacketSimulatorEntry *)MemoryManager_Alloc(NBN_MEM_PACKET_SIMULATOR_ENTRY);
|
||||
|
||||
entry->delay = packet_simulator->ping + jitter / 1000; /* and converted back to seconds */
|
||||
entry->delay = packet_simulator->ping + (double)jitter / 1000; /* and converted back to seconds */
|
||||
entry->receiver = receiver;
|
||||
entry->enqueued_at = packet_simulator->endpoint->time;
|
||||
|
||||
|
||||
Reference in new issue
Block a user