From 3bf9df6b2785fa6d951086978a3e66f49427166a Mon Sep 17 00:00:00 2001 From: FluorescentCIAAfricanAmerican <0934gj3049fk@protonmail.com> Date: Wed, 22 Apr 2020 12:56:21 -0400 Subject: 1 --- game/server/actanimating.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 game/server/actanimating.cpp (limited to 'game/server/actanimating.cpp') diff --git a/game/server/actanimating.cpp b/game/server/actanimating.cpp new file mode 100644 index 0000000..4a75660 --- /dev/null +++ b/game/server/actanimating.cpp @@ -0,0 +1,31 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +#include "cbase.h" +#include "actanimating.h" +#include "animation.h" +#include "activitylist.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +BEGIN_DATADESC( CActAnimating ) + DEFINE_CUSTOM_FIELD( m_Activity, ActivityDataOps() ), +END_DATADESC() + + +void CActAnimating::SetActivity( Activity act ) +{ + int sequence = SelectWeightedSequence( act ); + if ( sequence != ACTIVITY_NOT_AVAILABLE ) + { + ResetSequence( sequence ); + m_Activity = act; + SetCycle( 0 ); + } +} + -- cgit v1.2.3