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.

34 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "cbase.h"
  8. #include "entity_passtime_ball_spawn.h"
  9. #include "tf_passtime_ball.h"
  10. #include "tf_passtime_logic.h"
  11. // memdbgon must be the last include file in a .cpp file!!!
  12. #include "tier0/memdbgon.h"
  13. //-----------------------------------------------------------------------------
  14. BEGIN_DATADESC( CPasstimeBallSpawn )
  15. DEFINE_KEYFIELD( m_bDisabled, FIELD_BOOLEAN, "StartDisabled" ),
  16. DEFINE_INPUTFUNC( FIELD_VOID, "Enable", InputEnable ),
  17. DEFINE_INPUTFUNC( FIELD_VOID, "Disable", InputDisable ),
  18. DEFINE_OUTPUT( m_onSpawnBall, "OnSpawnBall" ),
  19. END_DATADESC()
  20. //-----------------------------------------------------------------------------
  21. LINK_ENTITY_TO_CLASS( info_passtime_ball_spawn, CPasstimeBallSpawn );
  22. //-----------------------------------------------------------------------------
  23. IMPLEMENT_AUTO_LIST( IPasstimeBallSpawnAutoList );
  24. //-----------------------------------------------------------------------------
  25. CPasstimeBallSpawn::CPasstimeBallSpawn() : m_bDisabled( false ) {}
  26. bool CPasstimeBallSpawn::IsEnabled() const { return !m_bDisabled; }
  27. void CPasstimeBallSpawn::InputEnable( inputdata_t& input ) { m_bDisabled = false; }
  28. void CPasstimeBallSpawn::InputDisable( inputdata_t& input ) { m_bDisabled = true; }