Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 51c693b

Browse files
authored
Merge pull request #43 from Calinou/increase-network-update-rate
Increase the network update rate to ~66.67 Hz
2 parents cc6aa81 + a60036c commit 51c693b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/fpsgame/client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ namespace game
11071107
void c2sinfo(bool force) // send update to the server
11081108
{
11091109
static int lastupdate = -1000;
1110-
if(totalmillis - lastupdate < 33 && !force) return; // don't update faster than 30fps
1110+
if(totalmillis - lastupdate < 15 && !force) return; // don't update faster than ~66.67fps
11111111
lastupdate = totalmillis;
11121112
sendpositions();
11131113
sendmessages();

src/fpsgame/server.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,9 +1768,9 @@ namespace server
17681768
{
17691769
if(clients.empty() || (!hasnonlocalclients() && !demorecord)) return false;
17701770
enet_uint32 curtime = enet_time_get()-lastsend;
1771-
if(curtime<33 && !force) return false;
1771+
if(curtime<15 && !force) return false;
17721772
bool flush = buildworldstate();
1773-
lastsend += curtime - (curtime%33);
1773+
lastsend += curtime - (curtime%15);
17741774
return flush;
17751775
}
17761776

0 commit comments

Comments
 (0)