aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/client/c_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/client/c_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/client/c_baseanimating.cpp')
-rw-r--r--mp/src/game/client/c_baseanimating.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/mp/src/game/client/c_baseanimating.cpp b/mp/src/game/client/c_baseanimating.cpp
index c71d2682..c7cc08b4 100644
--- a/mp/src/game/client/c_baseanimating.cpp
+++ b/mp/src/game/client/c_baseanimating.cpp
@@ -1013,7 +1013,9 @@ CStudioHdr *C_BaseAnimating::OnNewModel()
{
// XXX what's authoritative? the model pointer or the model index? what a mess.
nNewIndex = modelinfo->GetModelIndex( modelinfo->GetModelName( GetModel() ) );
- Assert( modelinfo->GetModel( nNewIndex ) == GetModel() );
+ Assert( nNewIndex < 0 || modelinfo->GetModel( nNewIndex ) == GetModel() );
+ if ( nNewIndex < 0 )
+ nNewIndex = m_nModelIndex;
}
m_AutoRefModelIndex = nNewIndex;
@@ -5099,7 +5101,7 @@ void C_BaseAnimating::StudioFrameAdvance()
SetCycle( flNewCycle );
- m_flGroundSpeed = GetSequenceGroundSpeed( hdr, GetSequence() );
+ m_flGroundSpeed = GetSequenceGroundSpeed( hdr, GetSequence() ) * GetModelScale();
#if 0
// I didn't have a test case for this, but it seems like the right thing to do. Check multi-player!
@@ -5289,7 +5291,7 @@ void C_BaseAnimating::ResetSequenceInfo( void )
}
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;