aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/baseanimating.cpp
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-12-03 08:54:16 -0800
committerJoe Ludwig <[email protected]>2013-12-03 08:54:16 -0800
commitbeaae8ac45a2f322a792404092d4482065bef7ef (patch)
tree747f35193ba235f0f0b070c05b53468a54559c8e /mp/src/game/server/baseanimating.cpp
parentMake .xcconfigs text files too. (diff)
downloadsource-sdk-2013-beaae8ac45a2f322a792404092d4482065bef7ef.tar.xz
source-sdk-2013-beaae8ac45a2f322a792404092d4482065bef7ef.zip
Updated the SDK with the latest code from the TF and HL2 branches
* Adds support for Visual Studio 2012 and 2013 * VR Mode: . Switches from headtrack.dll to sourcevr.dll . Improved readability of the UI in VR . Removed the IPD calibration tool. TF2 will now obey the Oculus configuration file. Use the Oculus calibration tool in your SDK or install and run "OpenVR" under Tools in Steam to calibrate your IPD. . Added dropdown to enable VR mode in the Video options. Removed the -vr command line option. . Added the ability to switch in and out of VR mode without quitting the game . By default VR mode will run full screen. To switch back to a borderless window set the vr_force_windowed convar. . Added support for VR mode on Linux * Many assorted bug fixes and other changes from Team Fortress in various shared files
Diffstat (limited to 'mp/src/game/server/baseanimating.cpp')
-rw-r--r--mp/src/game/server/baseanimating.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/mp/src/game/server/baseanimating.cpp b/mp/src/game/server/baseanimating.cpp
index 2e1e3a22..34bf6378 100644
--- a/mp/src/game/server/baseanimating.cpp
+++ b/mp/src/game/server/baseanimating.cpp
@@ -210,6 +210,9 @@ BEGIN_DATADESC( CBaseAnimating )
DEFINE_INPUT( m_fadeMaxDist, FIELD_FLOAT, "fademaxdist" ),
DEFINE_KEYFIELD( m_flFadeScale, FIELD_FLOAT, "fadescale" ),
+ DEFINE_KEYFIELD( m_flModelScale, FIELD_FLOAT, "modelscale" ),
+ DEFINE_INPUTFUNC( FIELD_VECTOR, "SetModelScale", InputSetModelScale ),
+
DEFINE_FIELD( m_fBoneCacheFlags, FIELD_SHORT ),
END_DATADESC()
@@ -441,7 +444,7 @@ void CBaseAnimating::StudioFrameAdvanceInternal( CStudioHdr *pStudioHdr, float f
m_flAnimTime.Get(), m_flPrevAnimTime, flInterval, GetCycle() );
*/
- m_flGroundSpeed = GetSequenceGroundSpeed( pStudioHdr, GetSequence() );
+ m_flGroundSpeed = GetSequenceGroundSpeed( pStudioHdr, GetSequence() ) * GetModelScale();
// Msg("%s : %s : %5.1f\n", GetClassname(), GetSequenceName( GetSequence() ), GetCycle() );
InvalidatePhysicsRecursive( ANIMATION_CHANGED );
@@ -610,6 +613,17 @@ void CBaseAnimating::InputSetLightingOrigin( inputdata_t &inputdata )
SetLightingOrigin( strLightingOrigin );
}
+//-----------------------------------------------------------------------------
+// Purpose: SetModelScale input handler
+//-----------------------------------------------------------------------------
+void CBaseAnimating::InputSetModelScale( inputdata_t &inputdata )
+{
+ Vector vecScale;
+ inputdata.value.Vector3D( vecScale );
+
+ SetModelScale( vecScale.x, vecScale.y );
+}
+
//=========================================================
// SelectWeightedSequence
@@ -877,7 +891,7 @@ void CBaseAnimating::ResetSequenceInfo ( )
}
CStudioHdr *pStudioHdr = GetModelPtr();
- m_flGroundSpeed = GetSequenceGroundSpeed( pStudioHdr, GetSequence() );
+ m_flGroundSpeed = GetSequenceGroundSpeed( pStudioHdr, GetSequence() ) * GetModelScale();
m_bSequenceLoops = ((GetSequenceFlags( pStudioHdr, GetSequence() ) & STUDIO_LOOPING) != 0);
// m_flAnimTime = gpGlobals->time;
m_flPlaybackRate = 1.0;