24
24
* Development Team grants this exception to all derivative works.
25
25
*/
26
26
27
+ // ---------------------------------------------------------------------------------
28
+ // Includes
29
+ // ---------------------------------------------------------------------------------
27
30
#include " eiface.h"
28
31
#include " ispsharedmemory.h"
29
32
#include " modules/usermessage/usermessage.h"
30
33
#include " engine/IEngineSound.h"
34
+ #include " engine/IEngineTrace.h"
31
35
36
+
37
+ // Externals
38
+ extern IEngineTrace* enginetrace;
39
+
40
+
41
+ // ---------------------------------------------------------------------------------
42
+ // IVEngineServer
43
+ // ---------------------------------------------------------------------------------
44
+ // Overloads
32
45
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (get_single_player_shared_memory_space_overload, GetSinglePlayerSharedMemorySpace, 1 , 2 );
33
46
47
+ // Visitor function
34
48
template <class T >
35
49
void IVEngineServer_Visitor (T cls)
36
50
{
@@ -249,11 +263,15 @@ void IVEngineServer_Visitor(T cls)
249
263
;
250
264
}
251
265
266
+
267
+ // ---------------------------------------------------------------------------------
268
+ // IEngineSound
269
+ // ---------------------------------------------------------------------------------
252
270
inline void IEngineSound_EmitSound (IEngineSound* pEngineSound, IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample,
253
271
float flVolume, float flAttenuation, int iFlags = 0 , int iPitch = PITCH_NORM, const Vector *pOrigin = NULL , const Vector *pDirection = NULL ,
254
272
tuple origins = tuple(), bool bUpdatePositions = true, float soundtime = 0.0f, int speakerentity = -1)
255
273
{
256
- CUtlVector< Vector > pUtlVecOrigins = NULL ;
274
+ CUtlVector< Vector > pUtlVecOrigins;
257
275
for (int i=0 ; i < len (origins); i++)
258
276
{
259
277
pUtlVecOrigins.AddToTail (extract<Vector>(origins[i]));
@@ -262,6 +280,7 @@ inline void IEngineSound_EmitSound(IEngineSound* pEngineSound, IRecipientFilter&
262
280
pEngineSound->EmitSound (filter, iEntIndex, iChannel, pSample, -1 , pSample, flVolume, flAttenuation, 0 , iFlags, iPitch, pOrigin, pDirection, &pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity);
263
281
}
264
282
283
+ // Visitor function
265
284
template <class T >
266
285
void IEngineSound_Visitor (T cls)
267
286
{
@@ -272,4 +291,21 @@ void IEngineSound_Visitor(T cls)
272
291
" Returns True if the given sample is looping."
273
292
)
274
293
;
294
+
295
+ scope ().attr (" CONTENTS_BLOCKLIGHT" ) = CONTENTS_BLOCKLIGHT;
296
+
297
+ scope ().attr (" SURF_NOPAINT" ) = SURF_NOPAINT;
298
+
299
+ scope ().attr (" MASK_NPCFLUID" ) = MASK_NPCFLUID;
300
+ scope ().attr (" MASK_SHOT_BRUSHONLY" ) = MASK_SHOT_BRUSHONLY;
301
+ scope ().attr (" MASK_NPCWORLDSTATIC_FLUID" ) = MASK_NPCWORLDSTATIC_FLUID;
302
+ }
303
+
304
+
305
+ // ---------------------------------------------------------------------------------
306
+ // IEngineTrace
307
+ // ---------------------------------------------------------------------------------
308
+ inline int GetPointContents (const Vector &vecAbsPosition, IHandleEntity** ppEntity)
309
+ {
310
+ return enginetrace->GetPointContents (vecAbsPosition, MASK_ALL, ppEntity);
275
311
}
0 commit comments