Expose custom sdktools trace types from hl2sdk (#1822)
* Update trnatives.cpp * Update sdktools_trace.inc * Update trnatives.cpp
This commit is contained in:
@@ -164,6 +164,14 @@ enum RayType
|
||||
RayType_Infinite /**< The trace ray will go from the start position to infinity using a direction vector. */
|
||||
};
|
||||
|
||||
enum TraceType
|
||||
{
|
||||
TRACE_EVERYTHING = 0,
|
||||
TRACE_WORLD_ONLY, /**< NOTE: This does *not* test static props!!! */
|
||||
TRACE_ENTITIES_ONLY, /**< NOTE: This version will *not* test static props */
|
||||
TRACE_EVERYTHING_FILTER_PROPS /**< NOTE: This version will pass the IHandleEntity for props through the filter, unlike all other filters */
|
||||
};
|
||||
|
||||
typeset TraceEntityFilter
|
||||
{
|
||||
/**
|
||||
@@ -357,13 +365,15 @@ native void TR_EnumerateEntitiesPoint(const float pos[3],
|
||||
* @param filter Function to use as a filter.
|
||||
* @param data Arbitrary data value to pass through to the filter
|
||||
* function.
|
||||
* @param traceType Trace type.
|
||||
*/
|
||||
native void TR_TraceRayFilter(const float pos[3],
|
||||
const float vec[3],
|
||||
int flags,
|
||||
RayType rtype,
|
||||
TraceEntityFilter filter,
|
||||
any data=0);
|
||||
any data=0,
|
||||
TraceType traceType=TRACE_EVERYTHING);
|
||||
|
||||
/**
|
||||
* Starts up a new trace hull using a global trace result and a customized
|
||||
@@ -380,6 +390,7 @@ native void TR_TraceRayFilter(const float pos[3],
|
||||
* @param filter Function to use as a filter.
|
||||
* @param data Arbitrary data value to pass through to the filter
|
||||
* function.
|
||||
* @param traceType Trace type.
|
||||
*/
|
||||
native void TR_TraceHullFilter(const float pos[3],
|
||||
const float vec[3],
|
||||
@@ -387,7 +398,8 @@ native void TR_TraceHullFilter(const float pos[3],
|
||||
const float maxs[3],
|
||||
int flags,
|
||||
TraceEntityFilter filter,
|
||||
any data=0);
|
||||
any data=0,
|
||||
TraceType traceType=TRACE_EVERYTHING);
|
||||
|
||||
/**
|
||||
* Clips a ray to a particular entity.
|
||||
@@ -478,6 +490,7 @@ native Handle TR_TraceHullEx(const float pos[3],
|
||||
* @param rtype Method to calculate the ray direction.
|
||||
* @param filter Function to use as a filter.
|
||||
* @param data Arbitrary data value to pass through to the filter function.
|
||||
* @param traceType Trace type.
|
||||
* @return Ray trace handle, which must be closed via CloseHandle().
|
||||
*/
|
||||
native Handle TR_TraceRayFilterEx(const float pos[3],
|
||||
@@ -485,7 +498,8 @@ native Handle TR_TraceRayFilterEx(const float pos[3],
|
||||
int flags,
|
||||
RayType rtype,
|
||||
TraceEntityFilter filter,
|
||||
any data=0);
|
||||
any data=0,
|
||||
TraceType traceType=TRACE_EVERYTHING);
|
||||
|
||||
/**
|
||||
* Starts up a new trace hull using a new trace result and a customized
|
||||
@@ -501,6 +515,7 @@ native Handle TR_TraceRayFilterEx(const float pos[3],
|
||||
* @param flags Trace flags.
|
||||
* @param filter Function to use as a filter.
|
||||
* @param data Arbitrary data value to pass through to the filter function.
|
||||
* @param traceType Trace type.
|
||||
* @return Ray trace handle, which must be closed via CloseHandle().
|
||||
*/
|
||||
native Handle TR_TraceHullFilterEx(const float pos[3],
|
||||
@@ -509,7 +524,8 @@ native Handle TR_TraceHullFilterEx(const float pos[3],
|
||||
const float maxs[3],
|
||||
int flags,
|
||||
TraceEntityFilter filter,
|
||||
any data=0);
|
||||
any data=0,
|
||||
TraceType traceType=TRACE_EVERYTHING);
|
||||
|
||||
/**
|
||||
* Clips a ray to a particular entity.
|
||||
|
||||
Reference in New Issue
Block a user