extensions/sdktools/trnatives.cpp
author David Anderson <dvander@alliedmods.net>
Tue Jan 22 17:18:15 2008 +0000 (2008-01-22)
changeset 1855 7871fb255eb5
parent 1330 ab94316bb52b
child 1859 76e8977e1193
permissions -rw-r--r--
added amb1383 - data value to filter functions
faluco@1075
     1
/**
faluco@1075
     2
 * vim: set ts=4 :
ds@1330
     3
 * =============================================================================
dvander@1233
     4
 * SourceMod SDKTools Extension
dvander@1233
     5
 * Copyright (C) 2004-2007 AlliedModders LLC.  All rights reserved.
ds@1330
     6
 * =============================================================================
faluco@1075
     7
 *
ds@1330
     8
 * This program is free software; you can redistribute it and/or modify it under
ds@1330
     9
 * the terms of the GNU General Public License, version 3.0, as published by the
ds@1330
    10
 * Free Software Foundation.
dvander@1233
    11
 * 
ds@1330
    12
 * This program is distributed in the hope that it will be useful, but WITHOUT
ds@1330
    13
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
ds@1330
    14
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
ds@1330
    15
 * details.
dvander@1233
    16
 *
ds@1330
    17
 * You should have received a copy of the GNU General Public License along with
ds@1330
    18
 * this program.  If not, see <http://www.gnu.org/licenses/>.
dvander@1233
    19
 *
ds@1330
    20
 * As a special exception, AlliedModders LLC gives you permission to link the
ds@1330
    21
 * code of this program (as well as its derivative works) to "Half-Life 2," the
ds@1330
    22
 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
ds@1330
    23
 * by the Valve Corporation.  You must obey the GNU General Public License in
ds@1330
    24
 * all respects for all other code used.  Additionally, AlliedModders LLC grants
ds@1330
    25
 * this exception to all derivative works.  AlliedModders LLC defines further
ds@1330
    26
 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
ds@1330
    27
 * or <http://www.sourcemod.net/license.php>.
faluco@1075
    28
 *
faluco@1075
    29
 * Version: $Id$
faluco@1075
    30
 */
faluco@1075
    31
faluco@1075
    32
#include "extension.h"
faluco@1075
    33
#include <worldsize.h>
faluco@1075
    34
faluco@1075
    35
class CSMTraceFilter : public CTraceFilter
faluco@1075
    36
{
faluco@1075
    37
public:
faluco@1075
    38
	bool ShouldHitEntity(IHandleEntity *pEntity, int contentsMask)
faluco@1075
    39
	{
faluco@1075
    40
		cell_t res = 1;
faluco@1075
    41
		edict_t *pEdict = gameents->BaseEntityToEdict(reinterpret_cast<CBaseEntity *>(pEntity));
faluco@1075
    42
		m_pFunc->PushCell(engine->IndexOfEdict(pEdict));
faluco@1075
    43
		m_pFunc->PushCell(contentsMask);
dvander@1855
    44
		m_pFunc->PushCell(m_Data);
faluco@1075
    45
		m_pFunc->Execute(&res);
faluco@1075
    46
faluco@1075
    47
		return (res) ? true : false;
faluco@1075
    48
	}
dvander@1855
    49
	void SetFunctionPtr(IPluginFunction *pFunc, cell_t data)
faluco@1075
    50
	{
faluco@1075
    51
		m_pFunc = pFunc;
dvander@1855
    52
		m_Data = data;
faluco@1075
    53
	}
faluco@1075
    54
private:
faluco@1075
    55
	IPluginFunction *m_pFunc;
dvander@1855
    56
	cell_t m_Data;
faluco@1075
    57
};
faluco@1075
    58
faluco@1075
    59
/* Used for the global trace version */
faluco@1075
    60
Ray_t g_Ray;
faluco@1075
    61
trace_t g_Trace;
faluco@1075
    62
Vector g_StartVec;
faluco@1075
    63
Vector g_EndVec;
faluco@1075
    64
QAngle g_DirAngles;
faluco@1075
    65
CTraceFilterHitAll g_HitAllFilter;
faluco@1075
    66
CSMTraceFilter g_SMTraceFilter;
faluco@1075
    67
faluco@1075
    68
enum
faluco@1075
    69
{
faluco@1075
    70
	RayType_EndPoint,
faluco@1075
    71
	RayType_Infinite
faluco@1075
    72
};
faluco@1075
    73
faluco@1075
    74
static cell_t smn_TRTraceRay(IPluginContext *pContext, const cell_t *params)
faluco@1075
    75
{
faluco@1075
    76
	cell_t *startaddr, *endaddr;
faluco@1075
    77
	pContext->LocalToPhysAddr(params[1], &startaddr);
faluco@1075
    78
	pContext->LocalToPhysAddr(params[2], &endaddr);
faluco@1075
    79
faluco@1075
    80
	g_StartVec.Init(sp_ctof(startaddr[0]), sp_ctof(startaddr[1]), sp_ctof(startaddr[2]));
faluco@1075
    81
faluco@1075
    82
	switch (params[4])
faluco@1075
    83
	{
faluco@1075
    84
	case RayType_EndPoint:
faluco@1075
    85
		{
faluco@1075
    86
			g_EndVec.Init(sp_ctof(endaddr[0]), sp_ctof(endaddr[1]), sp_ctof(endaddr[2]));
faluco@1075
    87
			break;
faluco@1075
    88
		}
faluco@1075
    89
	case RayType_Infinite:
faluco@1075
    90
		{
faluco@1075
    91
			g_DirAngles.Init(sp_ctof(endaddr[0]), sp_ctof(endaddr[1]), sp_ctof(endaddr[2]));
faluco@1075
    92
			AngleVectors(g_DirAngles, &g_EndVec);
faluco@1075
    93
faluco@1075
    94
			/* Make it unitary and get the ending point */
faluco@1075
    95
			g_EndVec.NormalizeInPlace();
faluco@1075
    96
			g_EndVec = g_StartVec + g_EndVec * MAX_TRACE_LENGTH;
faluco@1075
    97
			break;
faluco@1075
    98
		}
faluco@1075
    99
	}
faluco@1075
   100
faluco@1075
   101
	g_Ray.Init(g_StartVec, g_EndVec);
faluco@1075
   102
	enginetrace->TraceRay(g_Ray, params[3], &g_HitAllFilter, &g_Trace);
faluco@1075
   103
faluco@1075
   104
	return 1;
faluco@1075
   105
}
faluco@1075
   106
faluco@1075
   107
static cell_t smn_TRTraceRayFilter(IPluginContext *pContext, const cell_t *params)
faluco@1075
   108
{
faluco@1075
   109
	cell_t *startaddr, *endaddr;
faluco@1075
   110
	IPluginFunction *pFunc;
dvander@1855
   111
	cell_t data;
faluco@1075
   112
faluco@1075
   113
	pFunc = pContext->GetFunctionById(params[5]);
faluco@1075
   114
	if (!pFunc)
faluco@1075
   115
	{
faluco@1075
   116
		return pContext->ThrowNativeError("Invalid function id (%X)", params[5]);
faluco@1075
   117
	}
dvander@1855
   118
dvander@1855
   119
	if (params[0] >= 6)
dvander@1855
   120
	{
dvander@1855
   121
		data = params[6];
dvander@1855
   122
	}
dvander@1855
   123
	else
dvander@1855
   124
	{
dvander@1855
   125
		data = 0;
dvander@1855
   126
	}
dvander@1855
   127
dvander@1855
   128
	g_SMTraceFilter.SetFunctionPtr(pFunc, data);
faluco@1075
   129
	pContext->LocalToPhysAddr(params[1], &startaddr);
faluco@1075
   130
	pContext->LocalToPhysAddr(params[2], &endaddr);
faluco@1075
   131
faluco@1075
   132
	g_StartVec.Init(sp_ctof(startaddr[0]), sp_ctof(startaddr[1]), sp_ctof(startaddr[2]));
faluco@1075
   133
faluco@1075
   134
	switch (params[4])
faluco@1075
   135
	{
faluco@1075
   136
	case RayType_EndPoint:
faluco@1075
   137
		{
faluco@1075
   138
			g_EndVec.Init(sp_ctof(endaddr[0]), sp_ctof(endaddr[1]), sp_ctof(endaddr[2]));
faluco@1075
   139
			break;
faluco@1075
   140
		}
faluco@1075
   141
	case RayType_Infinite:
faluco@1075
   142
		{
faluco@1075
   143
			g_DirAngles.Init(sp_ctof(endaddr[0]), sp_ctof(endaddr[1]), sp_ctof(endaddr[2]));
faluco@1075
   144
			AngleVectors(g_DirAngles, &g_EndVec);
faluco@1075
   145
faluco@1075
   146
			/* Make it unitary and get the ending point */
faluco@1075
   147
			g_EndVec.NormalizeInPlace();
faluco@1075
   148
			g_EndVec = g_StartVec + g_EndVec * MAX_TRACE_LENGTH;
faluco@1075
   149
			break;
faluco@1075
   150
		}
faluco@1075
   151
	}
faluco@1075
   152
faluco@1075
   153
	g_Ray.Init(g_StartVec, g_EndVec);
faluco@1075
   154
	enginetrace->TraceRay(g_Ray, params[3], &g_SMTraceFilter, &g_Trace);
faluco@1075
   155
faluco@1075
   156
	return 1;
faluco@1075
   157
}
faluco@1075
   158
faluco@1075
   159
static cell_t smn_TRTraceRayEx(IPluginContext *pContext, const cell_t *params)
faluco@1075
   160
{
faluco@1075
   161
	cell_t *startaddr, *endaddr;
faluco@1075
   162
	pContext->LocalToPhysAddr(params[1], &startaddr);
faluco@1075
   163
	pContext->LocalToPhysAddr(params[2], &endaddr);
faluco@1075
   164
faluco@1075
   165
	Vector StartVec, EndVec;
faluco@1075
   166
	Ray_t ray;
faluco@1075
   167
faluco@1075
   168
	StartVec.Init(sp_ctof(startaddr[0]), sp_ctof(startaddr[1]), sp_ctof(startaddr[2]));
faluco@1075
   169
faluco@1075
   170
	switch (params[4])
faluco@1075
   171
	{
faluco@1075
   172
	case RayType_EndPoint:
faluco@1075
   173
		{
faluco@1075
   174
			EndVec.Init(sp_ctof(endaddr[0]), sp_ctof(endaddr[1]), sp_ctof(endaddr[2]));
faluco@1075
   175
			break;
faluco@1075
   176
		}
faluco@1075
   177
	case RayType_Infinite:
faluco@1075
   178
		{
faluco@1075
   179
			QAngle DirAngles;
faluco@1075
   180
			DirAngles.Init(sp_ctof(endaddr[0]), sp_ctof(endaddr[1]), sp_ctof(endaddr[2]));
faluco@1075
   181
			AngleVectors(DirAngles, &EndVec);
faluco@1075
   182
faluco@1075
   183
			/* Make it unitary and get the ending point */
faluco@1075
   184
			EndVec.NormalizeInPlace();
faluco@1075
   185
			EndVec = StartVec + EndVec * MAX_TRACE_LENGTH;
faluco@1075
   186
			break;
faluco@1075
   187
		}
faluco@1075
   188
	}
faluco@1075
   189
faluco@1075
   190
	trace_t *tr = new trace_t;
faluco@1075
   191
	ray.Init(StartVec, EndVec);
faluco@1075
   192
	enginetrace->TraceRay(ray, params[3], &g_HitAllFilter, tr);
faluco@1075
   193
faluco@1075
   194
	HandleError herr;
faluco@1075
   195
	Handle_t hndl;
faluco@1075
   196
	if (!(hndl=handlesys->CreateHandle(g_TraceHandle, tr, pContext->GetIdentity(), myself->GetIdentity(), &herr)))
faluco@1075
   197
	{
faluco@1075
   198
		delete tr;
faluco@1075
   199
		return pContext->ThrowNativeError("Unable to create a new trace handle (error %d)", herr);
faluco@1075
   200
	}
faluco@1075
   201
faluco@1075
   202
	return hndl;
faluco@1075
   203
}
faluco@1075
   204
faluco@1075
   205
static cell_t smn_TRTraceRayFilterEx(IPluginContext *pContext, const cell_t *params)
faluco@1075
   206
{
faluco@1075
   207
	IPluginFunction *pFunc;
faluco@1075
   208
	cell_t *startaddr, *endaddr;
dvander@1855
   209
	cell_t data;
faluco@1075
   210
faluco@1075
   211
	pFunc = pContext->GetFunctionById(params[5]);
faluco@1075
   212
	if (!pFunc)
faluco@1075
   213
	{
faluco@1075
   214
		return pContext->ThrowNativeError("Invalid function id (%X)", params[5]);
faluco@1075
   215
	}
faluco@1075
   216
	pContext->LocalToPhysAddr(params[1], &startaddr);
faluco@1075
   217
	pContext->LocalToPhysAddr(params[2], &endaddr);
faluco@1075
   218
faluco@1075
   219
	Vector StartVec, EndVec;
faluco@1075
   220
	CSMTraceFilter smfilter;
faluco@1075
   221
	Ray_t ray;
faluco@1075
   222
dvander@1855
   223
	if (params[0] >= 6)
dvander@1855
   224
	{
dvander@1855
   225
		data = params[6];
dvander@1855
   226
	}
dvander@1855
   227
	else
dvander@1855
   228
	{
dvander@1855
   229
		data = 0;
dvander@1855
   230
	}
dvander@1855
   231
dvander@1855
   232
	smfilter.SetFunctionPtr(pFunc, data);
faluco@1075
   233
	StartVec.Init(sp_ctof(startaddr[0]), sp_ctof(startaddr[1]), sp_ctof(startaddr[2]));
faluco@1075
   234
faluco@1075
   235
	switch (params[4])
faluco@1075
   236
	{
faluco@1075
   237
	case RayType_EndPoint:
faluco@1075
   238
		{
faluco@1075
   239
			EndVec.Init(sp_ctof(endaddr[0]), sp_ctof(endaddr[1]), sp_ctof(endaddr[2]));
faluco@1075
   240
			break;
faluco@1075
   241
		}
faluco@1075
   242
	case RayType_Infinite:
faluco@1075
   243
		{
faluco@1075
   244
			QAngle DirAngles;
faluco@1075
   245
			DirAngles.Init(sp_ctof(endaddr[0]), sp_ctof(endaddr[1]), sp_ctof(endaddr[2]));
faluco@1075
   246
			AngleVectors(DirAngles, &EndVec);
faluco@1075
   247
faluco@1075
   248
			/* Make it unitary and get the ending point */
faluco@1075
   249
			EndVec.NormalizeInPlace();
faluco@1075
   250
			EndVec = StartVec + EndVec * MAX_TRACE_LENGTH;
faluco@1075
   251
			break;
faluco@1075
   252
		}
faluco@1075
   253
	}
faluco@1075
   254
faluco@1075
   255
	trace_t *tr = new trace_t;
faluco@1075
   256
	ray.Init(StartVec, EndVec);
faluco@1075
   257
	enginetrace->TraceRay(ray, params[3], &smfilter, tr);
faluco@1075
   258
faluco@1075
   259
	HandleError herr;
faluco@1075
   260
	Handle_t hndl;
faluco@1075
   261
	if (!(hndl=handlesys->CreateHandle(g_TraceHandle, tr, pContext->GetIdentity(), myself->GetIdentity(), &herr)))
faluco@1075
   262
	{
faluco@1075
   263
		delete tr;
faluco@1075
   264
		return pContext->ThrowNativeError("Unable to create a new trace handle (error %d)", herr);
faluco@1075
   265
	}
faluco@1075
   266
faluco@1075
   267
	return hndl;
faluco@1075
   268
}
faluco@1075
   269
faluco@1075
   270
static cell_t smn_TRGetFraction(IPluginContext *pContext, const cell_t *params)
faluco@1075
   271
{
faluco@1075
   272
	trace_t *tr;
faluco@1075
   273
	HandleError err;
faluco@1075
   274
	HandleSecurity sec(pContext->GetIdentity(), myself->GetIdentity());
faluco@1075
   275
faluco@1075
   276
	if (params[1] == BAD_HANDLE)
faluco@1075
   277
	{
faluco@1075
   278
		tr = &g_Trace;
faluco@1075
   279
	} else if ((err = handlesys->ReadHandle(params[1], g_TraceHandle, &sec, (void **)&tr)) != HandleError_None) {
faluco@1075
   280
		return pContext->ThrowNativeError("Invalid Handle %x (error %d)", params[1], err);
faluco@1075
   281
	}
faluco@1075
   282
faluco@1075
   283
	return sp_ftoc(tr->fraction);
faluco@1075
   284
}
faluco@1075
   285
faluco@1075
   286
static cell_t smn_TRGetEndPosition(IPluginContext *pContext, const cell_t *params)
faluco@1075
   287
{
faluco@1075
   288
	trace_t *tr;
faluco@1075
   289
	HandleError err;
faluco@1075
   290
	HandleSecurity sec(pContext->GetIdentity(), myself->GetIdentity());
faluco@1075
   291
faluco@1075
   292
	if (params[2] == BAD_HANDLE)
faluco@1075
   293
	{
faluco@1075
   294
		tr = &g_Trace;
faluco@1075
   295
	} else if ((err = handlesys->ReadHandle(params[2], g_TraceHandle, &sec, (void **)&tr)) != HandleError_None) {
faluco@1075
   296
		return pContext->ThrowNativeError("Invalid Handle %x (error %d)", params[2], err);
faluco@1075
   297
	}
faluco@1075
   298
faluco@1075
   299
	cell_t *addr;
faluco@1075
   300
	pContext->LocalToPhysAddr(params[1], &addr);
faluco@1075
   301
faluco@1075
   302
	addr[0] = sp_ftoc(tr->endpos.x);
faluco@1075
   303
	addr[1] = sp_ftoc(tr->endpos.y);
faluco@1075
   304
	addr[2] = sp_ftoc(tr->endpos.z);
faluco@1075
   305
faluco@1075
   306
	return 1;
faluco@1075
   307
}
faluco@1075
   308
faluco@1075
   309
static cell_t smn_TRDidHit(IPluginContext *pContext, const cell_t *params)
faluco@1075
   310
{
faluco@1075
   311
	trace_t *tr;
faluco@1075
   312
	HandleError err;
faluco@1075
   313
	HandleSecurity sec(pContext->GetIdentity(), myself->GetIdentity());
faluco@1075
   314
faluco@1075
   315
	if (params[1] == BAD_HANDLE)
faluco@1075
   316
	{
faluco@1075
   317
		tr = &g_Trace;
faluco@1075
   318
	} else if ((err = handlesys->ReadHandle(params[1], g_TraceHandle, &sec, (void **)&tr)) != HandleError_None) {
faluco@1075
   319
		return pContext->ThrowNativeError("Invalid Handle %x (error %d)", params[1], err);
faluco@1075
   320
	}
faluco@1075
   321
faluco@1075
   322
	return tr->DidHit() ? 1 : 0;
faluco@1075
   323
}
faluco@1075
   324
faluco@1075
   325
static cell_t smn_TRGetHitGroup(IPluginContext *pContext, const cell_t *params)
faluco@1075
   326
{
faluco@1075
   327
	trace_t *tr;
faluco@1075
   328
	HandleError err;
faluco@1075
   329
	HandleSecurity sec(pContext->GetIdentity(), myself->GetIdentity());
faluco@1075
   330
faluco@1075
   331
	if (params[1] == BAD_HANDLE)
faluco@1075
   332
	{
faluco@1075
   333
		tr = &g_Trace;
faluco@1075
   334
	} else if ((err = handlesys->ReadHandle(params[1], g_TraceHandle, &sec, (void **)&tr)) != HandleError_None) {
faluco@1075
   335
		return pContext->ThrowNativeError("Invalid Handle %x (error %d)", params[1], err);
faluco@1075
   336
	}
faluco@1075
   337
faluco@1075
   338
	return tr->hitgroup;
faluco@1075
   339
}
faluco@1075
   340
faluco@1075
   341
static cell_t smn_TRGetEntityIndex(IPluginContext *pContext, const cell_t *params)
faluco@1075
   342
{
faluco@1075
   343
	trace_t *tr;
faluco@1075
   344
	HandleError err;
faluco@1075
   345
	HandleSecurity sec(pContext->GetIdentity(), myself->GetIdentity());
faluco@1075
   346
faluco@1075
   347
	if (params[1] == BAD_HANDLE)
faluco@1075
   348
	{
faluco@1075
   349
		tr = &g_Trace;
faluco@1075
   350
	} else if ((err = handlesys->ReadHandle(params[1], g_TraceHandle, &sec, (void **)&tr)) != HandleError_None) {
faluco@1075
   351
		return pContext->ThrowNativeError("Invalid Handle %x (error %d)", params[1], err);
faluco@1075
   352
	}
faluco@1075
   353
faluco@1075
   354
	edict_t *pEdict = gameents->BaseEntityToEdict(tr->m_pEnt);
faluco@1075
   355
	return engine->IndexOfEdict(pEdict);
faluco@1075
   356
}
faluco@1075
   357
faluco@1075
   358
static cell_t smn_TRGetPointContents(IPluginContext *pContext, const cell_t *params)
faluco@1075
   359
{
faluco@1075
   360
	cell_t *vec, *ent;
faluco@1075
   361
	IHandleEntity *hentity;
faluco@1075
   362
	Vector pos;
faluco@1075
   363
	int mask;
faluco@1075
   364
faluco@1075
   365
	pContext->LocalToPhysAddr(params[1], &vec);
faluco@1075
   366
	pContext->LocalToPhysAddr(params[2], &ent);
faluco@1075
   367
faluco@1075
   368
	pos.x = sp_ctof(vec[0]);
faluco@1075
   369
	pos.y = sp_ctof(vec[1]);
faluco@1075
   370
	pos.z = sp_ctof(vec[2]);
faluco@1075
   371
faluco@1075
   372
	if (*ent == -1)
faluco@1075
   373
	{
faluco@1075
   374
		mask = enginetrace->GetPointContents(pos);
faluco@1075
   375
	} else {
faluco@1075
   376
		mask = enginetrace->GetPointContents(pos, &hentity);
faluco@1075
   377
		edict_t *pEdict = gameents->BaseEntityToEdict(reinterpret_cast<CBaseEntity *>(hentity));
faluco@1075
   378
		*ent = engine->IndexOfEdict(pEdict);
faluco@1075
   379
	}
faluco@1075
   380
faluco@1075
   381
	return mask;
faluco@1075
   382
}
faluco@1075
   383
faluco@1075
   384
static cell_t smn_TRGetPointContentsEnt(IPluginContext *pContext, const cell_t *params)
faluco@1075
   385
{
faluco@1075
   386
	edict_t *pEdict = engine->PEntityOfEntIndex(params[1]);
faluco@1075
   387
	if (!pEdict || pEdict->IsFree())
faluco@1075
   388
	{
faluco@1075
   389
		return pContext->ThrowNativeError("Entity %d is invalid", params[1]);
faluco@1075
   390
	}
faluco@1075
   391
faluco@1075
   392
	cell_t *addr;
faluco@1075
   393
	Vector pos;
faluco@1075
   394
faluco@1075
   395
	pContext->LocalToPhysAddr(params[2], &addr);
faluco@1075
   396
faluco@1075
   397
	pos.x = sp_ctof(addr[0]);
faluco@1075
   398
	pos.y = sp_ctof(addr[1]);
faluco@1075
   399
	pos.z = sp_ctof(addr[2]);
faluco@1075
   400
faluco@1075
   401
	return enginetrace->GetPointContents_Collideable(pEdict->GetCollideable(), pos);
faluco@1075
   402
}
faluco@1075
   403
faluco@1075
   404
sp_nativeinfo_t g_TRNatives[] = 
faluco@1075
   405
{
faluco@1075
   406
	{"TR_TraceRay",				smn_TRTraceRay},
faluco@1075
   407
	{"TR_TraceRayEx",			smn_TRTraceRayEx},
faluco@1075
   408
	{"TR_GetFraction",			smn_TRGetFraction},
faluco@1075
   409
	{"TR_GetEndPosition",		smn_TRGetEndPosition},
faluco@1075
   410
	{"TR_GetEntityIndex",		smn_TRGetEntityIndex},
faluco@1075
   411
	{"TR_DidHit",				smn_TRDidHit},
faluco@1075
   412
	{"TR_GetHitGroup",			smn_TRGetHitGroup},
faluco@1075
   413
	{"TR_GetPointContents",		smn_TRGetPointContents},
faluco@1075
   414
	{"TR_GetPointContentsEnt",	smn_TRGetPointContentsEnt},
faluco@1075
   415
	{"TR_TraceRayFilter",		smn_TRTraceRayFilter},
faluco@1075
   416
	{"TR_TraceRayFilterEx",		smn_TRTraceRayFilterEx},
faluco@1075
   417
	{NULL,						NULL}
faluco@1075
   418
};