Home | History | Annotate | Download | only in jni

Lines Matching refs:ent

37 qboolean SV_CheckBottom (edict_t *ent)
44 VectorAdd (ent->u.v.origin, ent->u.v.mins, mins);
45 VectorAdd (ent->u.v.origin, ent->u.v.maxs, maxs);
74 trace = SV_Move (start, vec3_origin, vec3_origin, stop, true, ent);
87 trace = SV_Move (start, vec3_origin, vec3_origin, stop, true, ent);
110 qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
119 VectorCopy (ent->u.v.origin, oldorg);
120 VectorAdd (ent->u.v.origin, move, neworg);
123 if ( (int)ent->u.v.flags & (FL_SWIM | FL_FLY) )
128 VectorAdd (ent->u.v.origin, move, neworg);
129 enemy = PROG_TO_EDICT(ent->u.v.enemy);
132 dz = ent->u.v.origin[2] - PROG_TO_EDICT(ent->u.v.enemy)->u.v.origin[2];
138 trace = SV_Move (ent->u.v.origin, ent->u.v.mins, ent->u.v.maxs, neworg, false, ent);
142 if ( ((int)ent->u.v.flags & FL_SWIM) && SV_PointContents(trace.endpos) == CONTENTS_EMPTY )
145 VectorCopy (trace.endpos, ent->u.v.origin);
147 SV_LinkEdict (ent, true);
163 trace = SV_Move (neworg, ent->u.v.mins, ent->u.v.maxs, end, false, ent);
171 trace = SV_Move (neworg, ent->u.v.mins, ent->u.v.maxs, end, false, ent);
178 if ( (int)ent->u.v.flags & FL_PARTIALGROUND )
180 VectorAdd (ent->u.v.origin, move, ent->u.v.origin);
182 SV_LinkEdict (ent, true);
183 ent->u.v.flags = (int)ent->u.v.flags & ~FL_ONGROUND;
192 VectorCopy (trace.endpos, ent->u.v.origin);
194 if (!SV_CheckBottom (ent))
196 if ( (int)ent->u.v.flags & FL_PARTIALGROUND )
200 SV_LinkEdict (ent, true);
203 VectorCopy (oldorg, ent->u.v.origin);
207 if ( (int)ent->u.v.flags & FL_PARTIALGROUND )
210 ent->u.v.flags = (int)ent->u.v.flags & ~FL_PARTIALGROUND;
212 ent->u.v.groundentity = EDICT_TO_PROG(trace.ent);
216 SV_LinkEdict (ent, true);
233 qboolean SV_StepDirection (edict_t *ent, float yaw, float dist)
238 ent->u.v.ideal_yaw = yaw;
246 VectorCopy (ent->u.v.origin, oldorigin);
247 if (SV_movestep (ent, move, false))
249 delta = ent->u.v.angles[YAW] - ent->u.v.ideal_yaw;
252 VectorCopy (oldorigin, ent->u.v.origin);
254 SV_LinkEdict (ent, true);
257 SV_LinkEdict (ent, true);
268 void SV_FixCheckBottom (edict_t *ent)
272 ent->u.v.flags = (int)ent->u.v.flags | FL_PARTIALGROUND;
373 qboolean SV_CloseEnough (edict_t *ent, edict_t *goal, float dist)
379 if (goal->u.v.absmin[i] > ent->u.v.absmax[i] + dist)
381 if (goal->u.v.absmax[i] < ent->u.v.absmin[i] - dist)
395 edict_t *ent, *goal;
401 ent = PROG_TO_EDICT(pr_global_struct->self);
402 goal = PROG_TO_EDICT(ent->u.v.goalentity);
405 if ( !( (int)ent->u.v.flags & (FL_ONGROUND|FL_FLY|FL_SWIM) ) )
413 enemy = PROG_TO_EDICT(ent->u.v.enemy);
414 if (enemy != sv.edicts && SV_CloseEnough (ent, enemy, dist) )
416 if ( PROG_TO_EDICT(ent->u.v.enemy) != sv.edicts && SV_CloseEnough (ent, goal, dist) )
422 !SV_StepDirection (ent, ent->u.v.ideal_yaw, dist))
424 SV_NewChaseDir (ent, goal, dist);