by Spike » Sat May 16, 2015 2:33 am
CSQC_Parse_Event events have no intrinsic relationship to any entity. you can send an entity index to the client, but the client possibly won't know what you're talking about (if the entity is not within that client's pvs at the time - there's always lag and resends that can give you problems like this). this is why there's a writeentity(), but only a readentitynum() that needs a separate lookup against entnum field, eg {entity e = find(world, entnum, readentitynum()); if (!e) panic();}
this might be fine if its a regular thing like an animation, but you're probably better off just transfering some field like .origin is transferred.
writing to a global when refering to the state of a single entity is dangerous - if your code uses the same global for every entity, that global will necissarily affect every entity that uses it. hence why it bugs out in that they're all affected.
you CAN use CSQC_Parse_Event for throwaway things like spawning particle effects in some weird crazy pattern, you can use it to update the client's hud, or update global state, but affecting a single entity is typically going to be unreliable.
.