Source 2007 Template Fixes: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with 'This is a collection of fixes that only effect the Source 2007 Template. === Fix laggy movement when Sprinting is disabled. === Apply this patch to game/shared/sdk/sdk_gamemovem…')
 
(Added a prediction fix for the shared player stuff)
Line 12: Line 12:
   
   
  mv->m_flClientMaxSpeed = flMaxSpeed - 100 + stamina;
  mv->m_flClientMaxSpeed = flMaxSpeed - 100 + stamina;
</source>
----
=== Missing prediction table entry on the client-side player ===
A prediction table in game/client/sdk/c_sdk_player.cpp is missing an entry for shared player data, causing some values such as the amount of stamina to appear jittery. Change it to resemble the following:
<source lang=cpp>
BEGIN_PREDICTION_DATA( C_SDKPlayer )
    DEFINE_PRED_TYPEDESCRIPTION( m_Shared, CSDKPlayerShared ), // This is the missing line
    (...)
END_PREDICTION_DATA()
</source>
</source>


[[Category:Programming]]
[[Category:Programming]]

Revision as of 17:41, 14 July 2011

This is a collection of fixes that only effect the Source 2007 Template.

Fix laggy movement when Sprinting is disabled.

Apply this patch to game/shared/sdk/sdk_gamemovement.cpp

@@ -124,7 +123,7 @@
 			else
 #endif // SDK_USE_SPRINTING
 			{
-				flMaxSpeed = m_pSDKPlayer->m_Shared.m_flRunSpeed;	//jogging
+				flMaxSpeed = m_pSDKPlayer->m_Shared.m_flSprintSpeed;	//jogging
 			}
 
 			mv->m_flClientMaxSpeed = flMaxSpeed - 100 + stamina;

Missing prediction table entry on the client-side player

A prediction table in game/client/sdk/c_sdk_player.cpp is missing an entry for shared player data, causing some values such as the amount of stamina to appear jittery. Change it to resemble the following:

BEGIN_PREDICTION_DATA( C_SDKPlayer )
    DEFINE_PRED_TYPEDESCRIPTION( m_Shared, CSDKPlayerShared ), // This is the missing line
    (...)
END_PREDICTION_DATA()