2424* Development Team grants this exception to all derivative works.
2525*/
2626
27+ // ---------------------------------------------------------------------------------
28+ // Includes
29+ // ---------------------------------------------------------------------------------
2730#include " eiface.h"
2831#include " ispsharedmemory.h"
2932#include " modules/usermessage/usermessage.h"
3033#include " engine/IEngineSound.h"
34+ #include " engine/IEngineTrace.h"
3135
36+
37+ // Externals
38+ extern IEngineTrace* enginetrace;
39+
40+
41+ // ---------------------------------------------------------------------------------
42+ // IVEngineServer
43+ // ---------------------------------------------------------------------------------
44+ // Overloads
3245BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (get_single_player_shared_memory_space_overload, GetSinglePlayerSharedMemorySpace, 1 , 2 );
3346
47+ // Visitor function
3448template <class T >
3549void IVEngineServer_Visitor (T cls)
3650{
@@ -249,11 +263,15 @@ void IVEngineServer_Visitor(T cls)
249263 ;
250264}
251265
266+
267+ // ---------------------------------------------------------------------------------
268+ // IEngineSound
269+ // ---------------------------------------------------------------------------------
252270inline void IEngineSound_EmitSound (IEngineSound* pEngineSound, IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample,
253271 float flVolume, float flAttenuation, int iFlags = 0 , int iPitch = PITCH_NORM, const Vector *pOrigin = NULL , const Vector *pDirection = NULL ,
254272 tuple origins = tuple(), bool bUpdatePositions = true, float soundtime = 0.0f, int speakerentity = -1)
255273{
256- CUtlVector< Vector > pUtlVecOrigins = NULL ;
274+ CUtlVector< Vector > pUtlVecOrigins;
257275 for (int i=0 ; i < len (origins); i++)
258276 {
259277 pUtlVecOrigins.AddToTail (extract<Vector>(origins[i]));
@@ -262,6 +280,7 @@ inline void IEngineSound_EmitSound(IEngineSound* pEngineSound, IRecipientFilter&
262280 pEngineSound->EmitSound (filter, iEntIndex, iChannel, pSample, -1 , pSample, flVolume, flAttenuation, 0 , iFlags, iPitch, pOrigin, pDirection, &pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity);
263281}
264282
283+ // Visitor function
265284template <class T >
266285void IEngineSound_Visitor (T cls)
267286{
@@ -272,4 +291,21 @@ void IEngineSound_Visitor(T cls)
272291 " Returns True if the given sample is looping."
273292 )
274293 ;
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);
275311}
0 commit comments