aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/baseanimating.cpp
diff options
context:
space:
mode:
authorNarendra Umate <[email protected]>2013-12-08 01:27:41 -0800
committerNarendra Umate <[email protected]>2013-12-08 01:27:41 -0800
commit4fa56874ba1557274c10077bf8386ece4c61dbd6 (patch)
treee2d336604e960b548e996d2e7dcfc5a1e1401b9e /mp/src/game/server/baseanimating.cpp
parentAdded DS_Store to .gitignore. (diff)
parentMake libSDL2.so/dylib into symlinks. (diff)
downloadsource-sdk-2013-4fa56874ba1557274c10077bf8386ece4c61dbd6.tar.xz
source-sdk-2013-4fa56874ba1557274c10077bf8386ece4c61dbd6.zip
Merge remote-tracking branch 'upstream/master'
Reverted .gitattributes xcode_ccache_wrapper change. Fixed line endings for .gitignore and .gitattributes.
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;