Difference between revisions of "Viewmodel Prediction Fix"

From Valve Developer Community
Jump to: navigation, search
(Created page with 'Apply this patch to '''game/shared/baseviewmodel_shared.cpp''' <source lang="cpp"> @@ -392,12 +392,12 @@ } // Add model-specific bob even if no weapon associated (for head bo…')
 
 
Line 1: Line 1:
 +
{{otherlang2
 +
|ru=Viewmodel Prediction Fix:ru
 +
}}
 +
 
Apply this patch to '''game/shared/baseviewmodel_shared.cpp'''
 
Apply this patch to '''game/shared/baseviewmodel_shared.cpp'''
 
<source lang="cpp">
 
<source lang="cpp">

Latest revision as of 04:56, 13 May 2013

Русский

Apply this patch to game/shared/baseviewmodel_shared.cpp

@@ -392,12 +392,12 @@
 	}
 	// Add model-specific bob even if no weapon associated (for head bob for off hand models)
 	AddViewModelBob( owner, vmorigin, vmangles );
-	// Add lag
-	CalcViewModelLag( vmorigin, vmangles, vmangoriginal );
 
 #if defined( CLIENT_DLL )
 	if ( !prediction->InPrediction() )
 	{
+		// Add lag
+		CalcViewModelLag( vmorigin, vmangles, vmangoriginal );
 		// Let the viewmodel shake at about 10% of the amplitude of the player's view
 		vieweffects->ApplyShake( vmorigin, vmangles, 0.1 );	
 	}