Still haven't been able to freeze animations, is it even possible?
here's some code I think should have worked:
In basecombatweapon.cpp:
void CBaseCombatWeapon::Operator_FrameUpdate( CBaseCombatCharacter
*pOperator )
{
// Update and dispatch the viewmodel events
CBasePlayer *pOwner = ToBasePlayer( GetOwner() );
if ( pOperator->GetFlags() & FL_FROZEN || pOwner->GetFlags() &
FL_FROZEN )
{
ClientPrint( pOwner, HUD_PRINTCENTER, "wooooooof" );
m_flPlaybackRate = 0.0f;
return;
}
// animating weapon code and other code follows here, if not
animating at least events seem to be launched from here
In c_baseplayer.cpp
void C_BasePlayer::PostThink( void )
{
#if !defined( NO_ENTITY_PREDICTION )
if ( GetFlags() & FL_FROZEN )
return;
if ( IsAlive())
{
// do weapon stuff
ItemPostFrame();
if ( GetFlags() & FL_ONGROUND )
{
m_Local.m_flFallVelocity = 0;
}
// Don't allow bogus sequence on player
if ( GetSequence() == -1 )
{
SetSequence( 0 );
}
StudioFrameAdvance();
}
// Even if dead simulate entities
SimulatePlayerSimulatedEntities();
#endif
}
In player.cpp:
void CBasePlayer::PostThink()
{
if ( GetFlags() & FL_FROZEN )
return;
// rest of code
}
Any help?
Yorg Kuijs wrote:
> Hey list,
>
> recently been trying to freeze weapon animations while a bool is set to
> true, I'm not really sure what needs to be done and where though, I
> believe StudioFrameAdvance should not be called, but animation still
> continue, there's also the playbackrate but I'm not sure if setting it
> to 0 will cancel the animation or just freeze it so you can start it
> back up later.
>
> Also does anybody know if there's a existing function or something else
> avaible that can freeze the weapon viewmodel animations?
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders