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.

63 lines
1.5 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #include "cbase.h"
  8. #include "c_physics_prop_statue.h"
  9. #include "debugoverlay_shared.h"
  10. // memdbgon must be the last include file in a .cpp file!!!
  11. #include "tier0/memdbgon.h"
  12. IMPLEMENT_CLIENTCLASS_DT(C_StatueProp, DT_StatueProp, CStatueProp)
  13. RecvPropEHandle( RECVINFO( m_hInitBaseAnimating ) ),
  14. RecvPropBool( RECVINFO( m_bShatter ) ),
  15. RecvPropInt( RECVINFO( m_nShatterFlags ) ),
  16. RecvPropVector( RECVINFO( m_vShatterPosition ) ),
  17. RecvPropVector( RECVINFO( m_vShatterForce ) ),
  18. END_RECV_TABLE()
  19. C_StatueProp::C_StatueProp()
  20. {
  21. }
  22. C_StatueProp::~C_StatueProp()
  23. {
  24. }
  25. void C_StatueProp::Spawn( void )
  26. {
  27. BaseClass::Spawn();
  28. m_EntClientFlags |= ENTCLIENTFLAG_DONTUSEIK;
  29. }
  30. void C_StatueProp::ComputeWorldSpaceSurroundingBox( Vector *pVecWorldMins, Vector *pVecWorldMaxs )
  31. {
  32. CBaseAnimating *pBaseAnimating = m_hInitBaseAnimating;
  33. if ( pBaseAnimating )
  34. {
  35. pBaseAnimating->CollisionProp()->WorldSpaceSurroundingBounds( pVecWorldMins, pVecWorldMaxs );
  36. }
  37. }
  38. void C_StatueProp::OnDataChanged( DataUpdateType_t updateType )
  39. {
  40. BaseClass::OnDataChanged( updateType );
  41. if ( m_bShatter )
  42. {
  43. // Here's the networked data to use with my effect
  44. //m_nShatterFlags;
  45. //m_vShatterPosition;
  46. //m_vShatterForce;
  47. //FIXME: shatter effects should call a function so derived classes can make their own
  48. // Do shatter effects here
  49. }
  50. }