diff --git a/SQCSim-common/netprotocol.cpp b/SQCSim-common/netprotocol.cpp index 98c3643..33403bf 100644 --- a/SQCSim-common/netprotocol.cpp +++ b/SQCSim-common/netprotocol.cpp @@ -217,9 +217,9 @@ void netprot::Serialize(Sync* sync, char* buf[], uint32_t* buflen) { (boost.invincible ? 0b10000000 : 0) | (boost.damage ? 0b01000000 : 0); - memcpy(*buf + sizeof(uint64_t) * 2 + sizeof(uint32_t) * 4 + sizeof(uint16_t) + 2, &boost8, sizeof(uint8_t)); + memcpy(*buf + sizeof(uint64_t) * 2 + sizeof(uint32_t) * 5 + sizeof(uint16_t) + 1, &boost8, sizeof(uint8_t)); - *buflen = sizeof(uint64_t) * 2 + sizeof(uint32_t) * 4 + sizeof(uint16_t) + sizeof(float) + 2; + *buflen = sizeof(uint64_t) * 2 + sizeof(uint32_t) * 5 + sizeof(uint16_t) + sizeof(float) + 2; } void netprot::Serialize(TeamInfo* tinfo, char* buf[], uint32_t* buflen) { @@ -792,11 +792,11 @@ bool netprot::Deserialize(Sync* sync, char* buf, uint32_t* buflen) { memcpy(&sync->hp, &hp, sizeof(float)); uint8_t boost = 0; - memcpy(&boost, &buf[2 + sizeof(uint64_t) * 2 + sizeof(uint32_t) * 4 + sizeof(uint16_t)], sizeof(uint8_t)); + memcpy(&boost, &buf[2 + sizeof(uint64_t) * 2 + sizeof(uint32_t) * 5 + sizeof(uint16_t)], sizeof(uint8_t)); sync->boost.invincible = boost & 0b10000000; sync->boost.damage = boost & 0b01000000; - *buflen = 2 + sizeof(uint64_t) * 2 + sizeof(uint32_t) * 4 + sizeof(uint16_t) + sizeof(float); + *buflen = 2 + sizeof(uint64_t) * 2 + sizeof(uint32_t) * 5 + sizeof(uint16_t) + sizeof(float); return true; } diff --git a/SQCSim-srv/server.cpp b/SQCSim-srv/server.cpp index 15bfd9b..3dd93d5 100644 --- a/SQCSim-srv/server.cpp +++ b/SQCSim-srv/server.cpp @@ -305,7 +305,6 @@ void Server::Run() { /* Process */ if (conn->m_nsync) { - Timestamp tstamp = conn->Run(m_world, m_boosters); if (conn->player->AmIDead() && !conn->player->Eulogy) {