Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
719 B

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #include "cbase.h"
  9. #include "actanimating.h"
  10. #include "animation.h"
  11. #include "activitylist.h"
  12. // memdbgon must be the last include file in a .cpp file!!!
  13. #include "tier0/memdbgon.h"
  14. BEGIN_DATADESC( CActAnimating )
  15. DEFINE_CUSTOM_FIELD( m_Activity, ActivityDataOps() ),
  16. END_DATADESC()
  17. void CActAnimating::SetActivity( Activity act )
  18. {
  19. int sequence = SelectWeightedSequence( act );
  20. if ( sequence != ACTIVITY_NOT_AVAILABLE )
  21. {
  22. ResetSequence( sequence );
  23. m_Activity = act;
  24. SetCycle( 0 );
  25. }
  26. }