Browse Source

game(hl1): fix SetBoneController

pull/121/head
nillerusr 2 years ago
parent
commit
c91e68975b
  1. 4
      game/client/c_baseanimating.cpp
  2. 3
      game/server/baseanimating.cpp
  3. 1
      game/server/hl1/hl1_npc_barnacle.cpp

4
game/client/c_baseanimating.cpp

@ -2647,7 +2647,7 @@ CMouthInfo *C_BaseAnimating::GetMouth( void )
#ifdef DEBUG_BONE_SETUP_THREADING #ifdef DEBUG_BONE_SETUP_THREADING
ConVar cl_warn_thread_contested_bone_setup("cl_warn_thread_contested_bone_setup", "0" ); ConVar cl_warn_thread_contested_bone_setup("cl_warn_thread_contested_bone_setup", "0" );
#endif #endif
//ConVar cl_threaded_bone_setup("cl_threaded_bone_setup", "1", 0, "Enable parallel processing of C_BaseAnimating::SetupBones()" ); ConVar cl_threaded_bone_setup("cl_threaded_bone_setup", "0", 0, "Enable parallel processing of C_BaseAnimating::SetupBones()" );
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Do the default sequence blending rules as done in HL1 // Purpose: Do the default sequence blending rules as done in HL1
@ -2682,7 +2682,7 @@ void C_BaseAnimating::ShutdownBoneSetupThreadPool()
void C_BaseAnimating::ThreadedBoneSetup() void C_BaseAnimating::ThreadedBoneSetup()
{ {
g_bDoThreadedBoneSetup = true; //cl_threaded_bone_setup.GetBool(); g_bDoThreadedBoneSetup = cl_threaded_bone_setup.GetBool();
if ( g_bDoThreadedBoneSetup ) if ( g_bDoThreadedBoneSetup )
{ {
int nCount = g_PreviousBoneSetups.Count(); int nCount = g_PreviousBoneSetups.Count();

3
game/server/baseanimating.cpp

@ -2743,8 +2743,9 @@ float CBaseAnimating::SetBoneController ( int iController, float flValue )
float newValue; float newValue;
float retVal = Studio_SetController( pmodel, iController, flValue, newValue ); float retVal = Studio_SetController( pmodel, iController, flValue, newValue );
m_flEncodedController.Set( iController, newValue );
float &val = m_flEncodedController.GetForModify( iController );
val = newValue;
return retVal; return retVal;
} }

1
game/server/hl1/hl1_npc_barnacle.cpp

@ -387,7 +387,6 @@ void CNPC_Barnacle::BarnacleThink ( void )
//Msg("tounge %f\n", m_flAltitude + m_flTongueAdj ); //Msg("tounge %f\n", m_flAltitude + m_flTongueAdj );
//NDebugOverlay::Box( GetAbsOrigin() - Vector( 0, 0, m_flAltitude ), Vector( -2, -2, -2 ), Vector( 2, 2, 2 ), 255,255,255, 0, 0.1 ); //NDebugOverlay::Box( GetAbsOrigin() - Vector( 0, 0, m_flAltitude ), Vector( -2, -2, -2 ), Vector( 2, 2, 2 ), 255,255,255, 0, 0.1 );
SetBoneController( 0, 0.f );
SetBoneController( 0, -(m_flAltitude + m_flTongueAdj) ); SetBoneController( 0, -(m_flAltitude + m_flTongueAdj) );
StudioFrameAdvance(); StudioFrameAdvance();
} }

Loading…
Cancel
Save