Generic Utility Functions


Functions

float snap_misc_normalyaw (float init_yaw)
void snap_misc_showpoint (vector point, string sprite, float ttl)
float snap_misc_jumptest (vector jump_origin, vector move_dir)

Function Documentation

float snap_misc_jumptest ( vector  jump_origin,
vector  move_dir 
)

We've found a drop -- can the player jump it? Routine adapted for bots too.

Parameters:
jump_origin .
move_dir .
Returns:
either SNAP_NAV_JMP_RUN or SNAP_NAV_JMP_NRM

Definition at line 392 of file misc.mqc.

References SNAP_NAV_JMP_NRM, SNAP_NAV_JMP_RUN, and vector().

Referenced by snap_nav_haz_main().

float snap_misc_normalyaw ( float  init_yaw  ) 

This normalises the yaw sent in.

Parameters:
init_yaw the Quake yaw.
Returns:
the normalised yaw.
The global variable ``SNAP_MISC_NORMYAW_OFFSET'' set in the function ``PutClientInServer'' in client.qc is used as an offset. This is because the player could spawn at any angle in a map -- we need to make sure that ``North'' is always considered to be the way they are facing when they spawn.

Definition at line 331 of file misc.mqc.

References SNAP_MISC_NORMYAW_OFFSET.

Referenced by snap_extnav_compass(), and snap_misc_ownervisible().

void snap_misc_showpoint ( vector  point,
string  sprite,
float  ttl 
)

_Where's_ the point?

Parameters:
point Where the point is
sprite The model to use
ttl How long to show it for

Definition at line 372 of file misc.mqc.

References entity().


Generated on Tue Jan 1 17:55:54 2008 for AudioQuake QuakeC by  doxygen 1.5.4