mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
Another day, another bug found by Polo - this time in sendevent with entity references.
This commit is contained in:
parent
27f20b277e
commit
52bb3299b7
1 changed files with 3 additions and 1 deletions
|
@ -5557,6 +5557,7 @@ static void PF_cl_sendevent(void)
|
|||
const char *eventargs = G_STRING(OFS_PARM1);
|
||||
int a;
|
||||
eval_t *val;
|
||||
edict_t *ed;
|
||||
|
||||
MSG_WriteByte(&cls.message, clcfte_qcrequest);
|
||||
for (a = 2; a < 8 && *eventargs; a++, eventargs++)
|
||||
|
@ -5582,8 +5583,9 @@ static void PF_cl_sendevent(void)
|
|||
MSG_WriteFloat(&cls.message, G_FLOAT(OFS_PARM0+a*3+2));
|
||||
break;
|
||||
case 'e':
|
||||
ed = G_EDICT(OFS_PARM0+a*3);
|
||||
MSG_WriteByte(&cls.message, ev_entity);
|
||||
val = GetEdictFieldValue(host_client->edict, ED_FindFieldOffset("entnum")); //we need to transmit the SERVER's number, the client's number is meaningless to it.
|
||||
val = GetEdictFieldValue(ed, ED_FindFieldOffset("entnum")); //we need to transmit the SERVER's number, the client's number is meaningless to it.
|
||||
MSG_WriteEntity(&cls.message, val?val->_float:0, cl.protocol_pext2);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue