// returns 0..1 static inline float GetLatticePointValue( int idx_x, int idx_y, int idx_z ) { NOTE_UNUSED(perm_d); NOTE_UNUSED(impulse_ycoords); NOTE_UNUSED(impulse_zcoords); int ret_idx = perm_a[idx_x & 0xff]; ret_idx = perm_b[( idx_y + ret_idx ) & 0xff]; ret_idx = perm_c[( idx_z + ret_idx ) & 0xff]; return impulse_xcoords[ret_idx]; }
/* extern void SendProxy_Angles( const SendProp *pProp, const void *pStruct, const void *pData, DVariant *pOut, int iElement, int objectID ); void SendProxy_FuncRotatingAngles( const SendProp *pProp, const void *pStruct, const void *pData, DVariant *pOut, int iElement, int objectID ) { CFuncRotating *entity = (CFuncRotating*)pStruct; Assert( entity ); if ( entity->HasSpawnFlags(SF_BRUSH_ROTATE_CLIENTSIDE) ) { const QAngle *a = &entity->m_vecClientAngles; pOut->m_Vector[ 0 ] = anglemod( a->x ); pOut->m_Vector[ 1 ] = anglemod( a->y ); pOut->m_Vector[ 2 ] = anglemod( a->z ); return; } SendProxy_Angles( pProp, pStruct, pData, pOut, iElement, objectID ); } */ void SendProxy_FuncRotatingAngle( const SendProp *pProp, const void *pStruct, const void *pData, DVariant *pOut, int iElement, int objectID) { CFuncRotating *entity = (CFuncRotating*)pStruct; Assert( entity ); vec_t const *qa = (vec_t *)pData; vec_t const *ea = entity->GetLocalAngles().Base(); NOTE_UNUSED(ea); // Assert its actually an index into m_angRotation if not this won't work Assert( (uintp)qa >= (uintp)ea && (uintp)qa < (uintp)ea + sizeof( QAngle )); #ifdef TF_DLL if ( entity->HasSpawnFlags(SF_BRUSH_ROTATE_CLIENTSIDE) ) { const QAngle *a = &entity->m_vecClientAngles; pOut->m_Float = anglemod( (*a)[ qa - ea ] ); return; } #endif pOut->m_Float = anglemod( *qa ); Assert( IsFinite( pOut->m_Float ) ); }
int ListPanelStringSortFunc( vgui::ListPanel *pPanel, const vgui::ListPanelItem &item1, const vgui::ListPanelItem &item2 ) { NOTE_UNUSED( pPanel ); const char *pKey = GetKey( ( ColumnIndex_t )C ); const char *string1 = item1.kv->GetString( pKey ); const char *string2 = item2.kv->GetString( pKey ); return Q_stricmp( string1, string2 ); }
//----------------------------------------------------------------------------- // Invokes a method on all installed game systems in proper order //----------------------------------------------------------------------------- void InvokePerFrameMethod( PerFrameGameSystemFunc_t f, char const *timed /*=0*/ ) { NOTE_UNUSED( timed ); int i; int c = s_GameSystemsPerFrame.Count(); for ( i = 0; i < c ; ++i ) { IGameSystemPerFrame *sys = s_GameSystemsPerFrame[i]; MDLCACHE_CRITICAL_SECTION(); (sys->*f)(); } }
//----------------------------------------------------------------------------- // Invokes a method on all installed game systems in proper order //----------------------------------------------------------------------------- void InvokeMethod( GameSystemFunc_t f, char const *timed /*=0*/ ) { NOTE_UNUSED( timed ); int i; int c = s_GameSystems.Count(); for ( i = 0; i < c ; ++i ) { IGameSystem *sys = s_GameSystems[i]; MDLCACHE_COARSE_LOCK(); MDLCACHE_CRITICAL_SECTION(); (sys->*f)(); } }
//----------------------------------------------------------------------------- // Invokes a method on all installed game systems in proper order //----------------------------------------------------------------------------- void InvokeMethodTickProgress( GameSystemFunc_t f, char const *timed /*=0*/ ) { NOTE_UNUSED( timed ); int i; int c = s_GameSystems.Count(); for ( i = 0; i < c ; ++i ) { IGameSystem *sys = s_GameSystems[i]; MDLCACHE_COARSE_LOCK(); MDLCACHE_CRITICAL_SECTION(); #if defined( CLIENT_DLL ) engine->TickProgressBar(); #endif (sys->*f)(); } }
//----------------------------------------------------------------------------- // Invokes a method on all installed game systems in proper order //----------------------------------------------------------------------------- void InvokePerFrameMethod( PerFrameGameSystemFunc_t f, char const *timed /*=0*/ ) { NOTE_UNUSED( timed ); int i; int c = s_GameSystemsPerFrame.Count(); for ( i = 0; i < c ; ++i ) { IGameSystemPerFrame *sys = s_GameSystemsPerFrame[i]; #if (VPROF_LEVEL > 0) && defined(VPROF_ACCOUNT_GAMESYSTEMS) // make sure each game system is individually attributed // because vprof nodes must really be constructed with a pointer to a static // string, we can't create a temporary char[] here and sprintf a distinctive // V_snprintf( buf, 63, "gamesys_preframe_%s", sys->Name() ). We'll have to // settle for just the system name, and distinguish between pre and post frame // in hierarchy. VPROF( sys->Name() ); #endif MDLCACHE_CRITICAL_SECTION(); (sys->*f)(); } }
//----------------------------------------------------------------------------- // Invokes a method on all installed game systems in proper order //----------------------------------------------------------------------------- void InvokeMethod( GameSystemFunc_t f, char const *timed /*=0*/ ) { #if defined( _XBOX ) #if !defined( _RETAIL ) char sz[ 128 ]; #endif #else NOTE_UNUSED( timed ); #endif int i; int c = s_GameSystems.Count(); for ( i = 0; i < c ; ++i ) { IGameSystem *sys = s_GameSystems[i]; MDLCACHE_CRITICAL_SECTION(); #if !defined( _RETAIL ) #if defined( _XBOX ) if ( timed ) { Q_snprintf( sz, sizeof( sz ), "%s->%s():Start", sys->Name(), timed ); XBX_rTimeStampLog( Plat_FloatTime(), sz ); } #endif #endif (sys->*f)(); #if !defined( _RETAIL ) #if defined( _XBOX ) if ( timed ) { Q_snprintf( sz, sizeof( sz ), "%s->%s():Finish", sys->Name(), timed ); XBX_rTimeStampLog( Plat_FloatTime(), sz ); } #endif #endif } }