Simplified entryIndex assignment in StringTable_BitRead
This commit is contained in:
parent
6c4f8e634a
commit
1ca5fbfd2c
|
@ -21,16 +21,15 @@ static void StringTable_BitRead(NetHandlers::BitRead& bitbuf, SourceGameContext&
|
|||
{
|
||||
const size_t numEncodeBits = math::log2(data->maxEntries);
|
||||
std::vector<StringHistoryEntry> history;
|
||||
int lastEntry = -1;
|
||||
int entryIndex = -1;
|
||||
for (uint i = 0; i < data->numEntries; ++i)
|
||||
{
|
||||
int entryIndex = lastEntry + 1;
|
||||
entryIndex++;
|
||||
|
||||
if (bitbuf.ReadOneBit() == 0)
|
||||
{
|
||||
entryIndex = bitbuf.ReadUBitLong(numEncodeBits);
|
||||
}
|
||||
lastEntry = entryIndex;
|
||||
|
||||
const char *pEntry = NULL;
|
||||
char entry[1024];
|
||||
|
|
Loading…
Reference in New Issue
Block a user