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.

47 lines
1.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "c_basedoor.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. // ------------------------------------------------------------------------
  11. class C_FuncMoveLinear: public C_BaseToggle
  12. {
  13. public:
  14. DECLARE_CLASS( C_FuncMoveLinear, C_BaseToggle );
  15. DECLARE_CLIENTCLASS();
  16. IMPLEMENT_NETWORK_VAR_FOR_DERIVED( m_vecVelocity );
  17. IMPLEMENT_NETWORK_VAR_FOR_DERIVED( m_fFlags );
  18. C_FuncMoveLinear();
  19. virtual void OnDataChanged( DataUpdateType_t type );
  20. };
  21. IMPLEMENT_CLIENTCLASS_DT( C_FuncMoveLinear, DT_FuncMoveLinear, CFuncMoveLinear )
  22. RecvPropVector( RECVINFO(m_vecVelocity), 0, RecvProxy_LocalVelocity ),
  23. RecvPropInt( RECVINFO( m_fFlags ) ),
  24. END_RECV_TABLE()
  25. C_FuncMoveLinear::C_FuncMoveLinear()
  26. {
  27. }
  28. void C_FuncMoveLinear::OnDataChanged( DataUpdateType_t type )
  29. {
  30. BaseClass::OnDataChanged( type );
  31. if ( type == DATA_UPDATE_CREATED )
  32. {
  33. SetSolid(SOLID_VPHYSICS);
  34. VPhysicsInitShadow( false, false );
  35. }
  36. }