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.

71 lines
1.2 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #include "cbase.h"
  7. #include "bonelist.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. CBoneList::CBoneList()
  11. {
  12. m_bShouldDelete = false;
  13. m_nBones = 0;
  14. Q_memset( m_vecPos, 0, sizeof( m_vecPos ) );
  15. Q_memset( m_quatRot, 0, sizeof( m_quatRot ) );
  16. }
  17. void CBoneList::Release()
  18. {
  19. if (m_bShouldDelete )
  20. {
  21. delete this;
  22. }
  23. else
  24. {
  25. Warning( "Called Release() on CBoneList not allocated via Alloc() method\n" );
  26. }
  27. }
  28. CBoneList *CBoneList::Alloc()
  29. {
  30. CBoneList *newList = new CBoneList;
  31. Assert( newList );
  32. if ( newList )
  33. {
  34. newList->m_bShouldDelete = true;
  35. }
  36. return newList;
  37. }
  38. CFlexList::CFlexList()
  39. {
  40. m_bShouldDelete = false;
  41. m_nNumFlexes = 0;
  42. Q_memset( m_flexWeights, 0, sizeof( m_flexWeights ) );
  43. }
  44. void CFlexList::Release()
  45. {
  46. if (m_bShouldDelete )
  47. {
  48. delete this;
  49. }
  50. else
  51. {
  52. Warning( "Called Release() on CFlexList not allocated via Alloc() method\n" );
  53. }
  54. }
  55. CFlexList *CFlexList::Alloc()
  56. {
  57. CFlexList *newList = new CFlexList;
  58. Assert( newList );
  59. if ( newList )
  60. {
  61. newList->m_bShouldDelete = true;
  62. }
  63. return newList;
  64. }