trace_line

Синтаксис

native trace_line(iIgnoreEnt, const Float:fStart[3], const Float:fEnd[3], Float:vReturn[3]);

Употреба

iIgnoreEnt
Entity index that trace will ignore, -1 if trace should
not ignore any entities
fStart
Trace starting point
fEnd
Trace target point
vReturn
Vector to copy trace end point to

Описание

Fires a trace line between two origins, retrieving the end point and entity
hit.

Забележка

This native writes to the global engine module trace handle. Additional
trace results can be retrieved using traceresult().

Забележка

This native returns 0 if the trace did not hit anything. As 0 is an
entity index that is considered to be a valid value for a trace hit
("worldspawn"), this native can potentially return a misleading value.
Check other components of the trace result to verify the entity index.

Връщаща стойност

Entity index if trace hit an entity, 0 otherwise