Added PointOutsideWorld native to sdktools (bug 3906, r=dvander)
This commit is contained in:
parent
2f3e172162
commit
e315726001
@ -557,6 +557,20 @@ static cell_t smn_TRGetPointContentsEnt(IPluginContext *pContext, const cell_t *
|
||||
return enginetrace->GetPointContents_Collideable(pEdict->GetCollideable(), pos);
|
||||
}
|
||||
|
||||
static cell_t smn_TRPointOutsideWorld(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
cell_t *vec;
|
||||
Vector pos;
|
||||
|
||||
pContext->LocalToPhysAddr(params[1], &vec);
|
||||
|
||||
pos.x = sp_ctof(vec[0]);
|
||||
pos.y = sp_ctof(vec[1]);
|
||||
pos.z = sp_ctof(vec[2]);
|
||||
|
||||
return enginetrace->PointOutsideWorld(pos)
|
||||
}
|
||||
|
||||
sp_nativeinfo_t g_TRNatives[] =
|
||||
{
|
||||
{"TR_TraceRay", smn_TRTraceRay},
|
||||
@ -575,5 +589,6 @@ sp_nativeinfo_t g_TRNatives[] =
|
||||
{"TR_TraceHullFilter", smn_TRTraceHullFilter},
|
||||
{"TR_TraceHullFilterEx", smn_TRTraceHullFilterEx},
|
||||
{"TR_GetPlaneNormal", smn_TRGetPlaneNormal},
|
||||
{"TR_PointOutsideWorld", smn_TRPointOutsideWorld},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
@ -365,3 +365,10 @@ native TR_GetHitGroup(Handle:hndl=INVALID_HANDLE);
|
||||
*/
|
||||
native TR_GetPlaneNormal(Handle:hndl, Float:normal[3]);
|
||||
|
||||
/**
|
||||
* Tests a point to see if it's outside any playable area
|
||||
*
|
||||
* @param pos Vector buffer to store data in.
|
||||
* @return True if outside world, otherwise false.
|
||||
*/
|
||||
native TR_PointOutsideWorld(Float:pos[3]);
|
Loading…
Reference in New Issue
Block a user