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.

42 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #include "cbase.h"
  7. #include "c_dod_player.h"
  8. #include "dodoverview.h"
  9. // memdbgon must be the last include file in a .cpp file!!!
  10. #include "tier0/memdbgon.h"
  11. class C_DODBombDispenserMapIcon : public C_BaseEntity
  12. {
  13. DECLARE_CLASS( C_DODBombDispenserMapIcon, C_BaseEntity );
  14. DECLARE_NETWORKCLASS();
  15. public:
  16. virtual ~C_DODBombDispenserMapIcon();
  17. virtual void OnDataChanged( DataUpdateType_t type );
  18. };
  19. IMPLEMENT_NETWORKCLASS_ALIASED( DODBombDispenserMapIcon, DT_DODBombDispenserMapIcon )
  20. BEGIN_NETWORK_TABLE(C_DODBombDispenserMapIcon, DT_DODBombDispenserMapIcon )
  21. END_NETWORK_TABLE()
  22. C_DODBombDispenserMapIcon::~C_DODBombDispenserMapIcon( void )
  23. {
  24. GetDODOverview()->RemoveObjectByIndex( entindex() );
  25. }
  26. void C_DODBombDispenserMapIcon::OnDataChanged( DataUpdateType_t type )
  27. {
  28. BaseClass::OnDataChanged( type );
  29. if ( type == DATA_UPDATE_CREATED )
  30. {
  31. GetDODOverview()->AddObject( "sprites/obj_icons/icon_bomb_dispenser", entindex(), -1 );
  32. }
  33. }