From: Daniel Karbach Date: Fri, 18 Sep 2015 14:21:52 +0000 (+0200) Subject: fixed int rollover in client entity update X-Git-Url: http://git.localhorst.tv/?a=commitdiff_plain;h=b050d119839ef95e7275c6c6cd21ee497dbf2a2a;p=blank.git fixed int rollover in client entity update --- diff --git a/src/client/client.cpp b/src/client/client.cpp index bb91847..52bc0a9 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -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();