Skip to content

Commit

Permalink
bit writing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wootguy committed Nov 11, 2024
1 parent 26174ba commit 3bea052
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dlls/mstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ uint8_t mstream::writeBits(uint64_t value, uint8_t bitCount) {
return bitCount;
}

bool mstream::endBitWriting() {
if (currentBit == 0 || currentBit == 8) {
bool mstream::endBitWriting() {
if (currentBit == 0 || eomFlag) {
return false;
}

Expand Down
1 change: 1 addition & 0 deletions dlls/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ inline entvars_t* VARS(EOFFSET eoffset) { return VARS(ENT(eoffset)); }
inline int ENTINDEX(const edict_t *pEdict) { return (*g_engfuncs.pfnIndexOfEdict)(pEdict); }
inline edict_t* INDEXENT( int iEdictNum ) { return (*g_engfuncs.pfnPEntityOfEntIndex)(iEdictNum); }
inline uint32_t PLRBIT(const edict_t* pEdict) { return 1 << (ENTINDEX(pEdict) & 31); }
inline uint32_t PLRBIT(uint32_t idx) { return 1 << (idx & 31); }
inline void MESSAGE_BEGIN( int msg_dest, int msg_type, const float *pOrigin, entvars_t *ent ) {
MESSAGE_BEGIN(msg_dest, msg_type, pOrigin, ENT(ent));
}
Expand Down

0 comments on commit 3bea052

Please sign in to comment.