]> git.localhorst.tv Git - blank.git/commitdiff
fixed int rollover in client entity update
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 18 Sep 2015 14:21:52 +0000 (16:21 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 18 Sep 2015 14:21:52 +0000 (16:21 +0200)
src/client/client.cpp

index bb91847baa558be55b02922a407c356a96700062..52bc0a9eea97ab729e7e2e62612b6ab8142fba2a 100644 (file)
@@ -456,7 +456,7 @@ bool MasterState::UpdateEntity(uint32_t entity_id, uint16_t seq) {
                return true;
        }
 
-       int pack_diff = int16_t(seq) - int16_t(entry->second.last_packet);
+       int16_t pack_diff = int16_t(seq) - int16_t(entry->second.last_packet);
        int time_diff = update_timer.Elapsed() - entry->second.last_update;
        entry->second.last_update = update_timer.Elapsed();