Skip to content

Commit

Permalink
Merge pull request #65 from web3gamedev/master
Browse files Browse the repository at this point in the history
cast jitter to double before dividing by 1000
  • Loading branch information
nathhB authored Jul 22, 2024
2 parents 32b1b62 + 4cd581b commit c5d34df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nbnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c5d34df

Please sign in to comment.