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.

46 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "model_types.h"
  8. #include "vcollide.h"
  9. #include "vcollide_parse.h"
  10. #include "solidsetdefaults.h"
  11. #include "bone_setup.h"
  12. #include "engine/ivmodelinfo.h"
  13. #include "physics.h"
  14. #include "c_breakableprop.h"
  15. #include "view.h"
  16. // memdbgon must be the last include file in a .cpp file!!!
  17. #include "tier0/memdbgon.h"
  18. IMPLEMENT_CLIENTCLASS_DT(C_BreakableProp, DT_BreakableProp, CBreakableProp)
  19. END_RECV_TABLE()
  20. //-----------------------------------------------------------------------------
  21. // Purpose:
  22. //-----------------------------------------------------------------------------
  23. C_BreakableProp::C_BreakableProp( void )
  24. {
  25. m_takedamage = DAMAGE_YES;
  26. }
  27. //-----------------------------------------------------------------------------
  28. // Purpose:
  29. //-----------------------------------------------------------------------------
  30. void C_BreakableProp::SetFadeMinMax( float fademin, float fademax )
  31. {
  32. m_fadeMinDist = fademin;
  33. m_fadeMaxDist = fademax;
  34. }
  35. //-----------------------------------------------------------------------------
  36. // Copy fade from another breakable prop
  37. //-----------------------------------------------------------------------------
  38. void C_BreakableProp::CopyFadeFrom( C_BreakableProp *pSource )
  39. {
  40. m_flFadeScale = pSource->m_flFadeScale;
  41. }