Team Fortress 2 Source Code as on 22/4/2020
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.

51 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "ragdoll_shared.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. class C_RagdollManager : public C_BaseEntity
  11. {
  12. public:
  13. DECLARE_CLASS( C_RagdollManager, C_BaseEntity );
  14. DECLARE_CLIENTCLASS();
  15. C_RagdollManager();
  16. // C_BaseEntity overrides.
  17. public:
  18. virtual void OnDataChanged( DataUpdateType_t updateType );
  19. public:
  20. int m_iCurrentMaxRagdollCount;
  21. };
  22. IMPLEMENT_CLIENTCLASS_DT_NOBASE( C_RagdollManager, DT_RagdollManager, CRagdollManager )
  23. RecvPropInt( RECVINFO( m_iCurrentMaxRagdollCount ) ),
  24. END_RECV_TABLE()
  25. //-----------------------------------------------------------------------------
  26. // Constructor
  27. //-----------------------------------------------------------------------------
  28. C_RagdollManager::C_RagdollManager()
  29. {
  30. m_iCurrentMaxRagdollCount = -1;
  31. }
  32. //-----------------------------------------------------------------------------
  33. // Purpose:
  34. // Input : updateType -
  35. //-----------------------------------------------------------------------------
  36. void C_RagdollManager::OnDataChanged( DataUpdateType_t updateType )
  37. {
  38. BaseClass::OnDataChanged( updateType );
  39. s_RagdollLRU.SetMaxRagdollCount( m_iCurrentMaxRagdollCount );
  40. }