Get the client entnum from the right place.

When trying to get the client ent num from an entity's owner, it helps if
the owner field is used :P Fixes a segfault firing nails (and sometimes
rockets) in freewill's coop mod. Hopefully fixes his "trigger in clipping
list" bug.
This commit is contained in:
Bill Currie 2012-07-13 11:12:31 +09:00
parent a9adc94aa8
commit 2dea74ce91

View file

@ -941,7 +941,7 @@ SV_Move (const vec3_t start, const vec3_t mins, const vec3_t maxs,
edict_t *owner;
owner = PROG_TO_EDICT (&sv_pr_state, SVentity (passedict, owner));
if (owner->entnum && owner->entnum <= MAX_CLIENTS) {
client_t *cl = &svs.clients[passedict->entnum - 1];
client_t *cl = &svs.clients[owner->entnum - 1];
clip.type |= MOVE_LAGGED;
sv.lagents = cl->laggedents;
sv.maxlagents = cl->laggedents_count;