Raised This Month: $ Target: $400
 0% 

Find out if a player is "stuck"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 11-18-2006 , 06:03   Re: Find out if a player is "stuck"
Reply With Quote #4

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
__________________

Last edited by schnitzelmaker; 11-18-2006 at 06:12.
schnitzelmaker is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode