mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-25 06:15:30 +03:00
Fix CScriptNetMsgHelper::WriteEntity()
This commit is contained in:
parent
4aeaaa46c7
commit
9bf1fb4cea
@ -1749,8 +1749,8 @@ void CNetMsgScriptHelper::WriteEntity( HSCRIPT hEnt )
|
||||
{
|
||||
SCRIPT_NETMSG_WRITE_FUNC
|
||||
CBaseEntity *p = ToEnt(hEnt);
|
||||
int i = p ? p->entindex() : -1;
|
||||
m_MsgOut.WriteSBitLong( i, MAX_EDICT_BITS );
|
||||
int i = p ? p->entindex() : 0;
|
||||
m_MsgOut.WriteUBitLong( i, MAX_EDICT_BITS );
|
||||
}
|
||||
|
||||
void CNetMsgScriptHelper::WriteEHandle( HSCRIPT hEnt )
|
||||
@ -1861,7 +1861,11 @@ bool CNetMsgScriptHelper::ReadBool()
|
||||
|
||||
HSCRIPT CNetMsgScriptHelper::ReadEntity()
|
||||
{
|
||||
int index = m_MsgIn_()ReadSBitLong( MAX_EDICT_BITS );
|
||||
int index = m_MsgIn_()ReadUBitLong( MAX_EDICT_BITS );
|
||||
|
||||
if ( !index )
|
||||
return NULL;
|
||||
|
||||
#ifdef GAME_DLL
|
||||
edict_t *e = INDEXENT(index);
|
||||
if ( e && !e->IsFree() )
|
||||
|
Loading…
Reference in New Issue
Block a user