I write an example,in engine:
Code:
//point_hull=0, human_hull=1, large_hull=2, head_hull=3 };
//trace_hull ( Float:origin[3], hull, [ ignoredent=0, ignoremonsters=0 ] )
if ( trace_hull(origin, HULL_HUMAN, idtoskip) == 0 )
client_print(id,print_chat,"you are NOT stucked")
else client_print(id,print_chat,"you are stucked")
Trace hull return a value of the object which is touched by trace hull:walls,ids,...
and for fakemeta:
Code:
enum
{
TR_AllSolid, // (int) if true, plane is not valid
TR_StartSolid, // (int) if true, the initial point was in a solid area
TR_InOpen, // (int)
TR_InWater, // (int)
TR_Fraction, // (float) time completed, 1.0 = didn't hit anything
TR_EndPos, // (vector) final position
TR_PlaneDist, // (float)
TR_PlaneNormal, // (vector) surface normal at impact
TR_Hit, // (entity) entity the surface is on
TR_Hitgroup // (int) 0 == generic, non zero is specific body part
};
Code:
new tr = 0
//EngFunc_TraceHull,(const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr);
engfunc(EngFunc_TraceHull, origin, origin, 0, hull, idtoskip, tr)
if (!get_tr2(tr, TR_StartSolid) && !get_tr2(tr, TR_AllSolid) && get_tr2(tr, TR_InOpen))
return true
return false
__________________