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.

52 lines
1.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Client side C_CSTeam class
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "cbase.h"
  8. #include "engine/IEngineSound.h"
  9. #include "hud.h"
  10. #include "recvproxy.h"
  11. #include "c_cs_team.h"
  12. // memdbgon must be the last include file in a .cpp file!!!
  13. #include "tier0/memdbgon.h"
  14. IMPLEMENT_CLIENTCLASS_DT(C_CSTeam, DT_CSTeam, CCSTeam)
  15. END_RECV_TABLE()
  16. //-----------------------------------------------------------------------------
  17. // Purpose:
  18. //-----------------------------------------------------------------------------
  19. C_CSTeam::C_CSTeam()
  20. {
  21. }
  22. //-----------------------------------------------------------------------------
  23. // Purpose:
  24. //-----------------------------------------------------------------------------
  25. C_CSTeam::~C_CSTeam()
  26. {
  27. }
  28. const char* Helper_GetLocalPlayerAssassinationQuestLocToken( const CEconQuestDefinition *pQuest )
  29. {
  30. if ( !pQuest )
  31. return NULL;
  32. KeyValues *pTargetKV = pQuest->GetStringTokens()->FindKey( "target" );
  33. return pTargetKV ? pTargetKV->GetString() : NULL;
  34. }
  35. bool Helper_GetDecoratedAssassinationTargetName( const CEconQuestDefinition *pQuest, wchar_t* pszBuffer, size_t nBuffSizeInCharacters )
  36. {
  37. const char* szToken = Helper_GetLocalPlayerAssassinationQuestLocToken( pQuest );
  38. if ( wchar_t *wszUndecoratedName = g_pVGuiLocalize->Find( szToken ) )
  39. {
  40. V_snwprintf( pszBuffer, nBuffSizeInCharacters, L"<font color = '#FF0000'><i>" PRI_WS_FOR_WS L"</i></font>", wszUndecoratedName );
  41. return true;
  42. }
  43. return false;
  44. }