SYNC_ACC CMOD_ACC GLOBALS

This commit is contained in:
MarcEricMartel
2023-12-13 14:27:11 -05:00
parent 2dbaf84844
commit fd1fe66d13
4 changed files with 23 additions and 22 deletions

View File

@@ -1454,8 +1454,8 @@ void Engine::Render(float elapsedTime) {
cmod_acc += tstamp - last;
last = tstamp;
if (sync_acc >= 200) {
sync_acc -= 200;
if (sync_acc >= SYNC_ACC) {
sync_acc -= SYNC_ACC;
sync.sid = id;
sync.timestamp = tstamp;
sync.position = m_player.GetPositionAbs();
@@ -1467,9 +1467,9 @@ void Engine::Render(float elapsedTime) {
m_syncs[sync.timestamp] = sync;
}
if (cmod_acc >= 2000) {
while (cmod_acc >= 2000)
cmod_acc -= 2000;
if (cmod_acc >= CMOD_ACC) {
while (cmod_acc >= CMOD_ACC)
cmod_acc -= CMOD_ACC;
if (!m_chunkmod_manifest.empty()) {
ChunkMod* cmod = m_chunkmod_manifest.front();
m_chunkmod_manifest.pop_front();