Skip to content

Commit 123af8e

Browse files
yumiraka1batross
authored andcommitted
client: remove gametype check from PlayerLocation
1 parent 3015cef commit 123af8e

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

cl_dll/hud.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,9 @@ class CCStrikeVoiceStatusHelper : public IVoiceStatusHelper
9797

9898
const char *GetPlayerLocation( int entindex ) override
9999
{
100-
if ( gHUD.GetGameType() == GAME_CZERO )
100+
if ( entindex >= 1 && entindex <= MAX_PLAYERS )
101101
{
102-
if ( entindex >= 1 && entindex <= MAX_PLAYERS )
103-
{
104-
return g_PlayerExtraInfo[entindex].location;
105-
}
102+
return g_PlayerExtraInfo[entindex].location;
106103
}
107104

108105
return "";

cl_dll/hud/radar.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,7 @@ int CHudRadar::Draw(float flTime)
376376
}
377377
}
378378

379-
if( gHUD.GetGameType() == GAME_CZERO )
380-
DrawPlayerLocation( ( m_hRadarOpaque.rect.Height() ) + 10 );
379+
DrawPlayerLocation( ( m_hRadarOpaque.rect.Height() ) + 10 );
381380

382381
return 0;
383382
}
@@ -390,12 +389,17 @@ void CHudRadar::DrawPlayerLocation( int y )
390389
// Localize the location string
391390
const char *szLocalizedLocation = Localize( szLocation );
392391

392+
// don't draw unlocalized location
393+
if( szLocalizedLocation[0] == '#' )
394+
return;
395+
393396
int x = (m_hRadarOpaque.rect.Width()) / 2;
394397
int len = DrawUtils::ConsoleStringLen( szLocalizedLocation );
395398

396399
x = x - len / 2;
397400
if( x < 0 ) x = 0;
398401

402+
DrawUtils::SetConsoleTextColor( g_ColorGreen[0], g_ColorGreen[1], g_ColorGreen[2] );
399403
DrawUtils::DrawConsoleString( x, y, szLocalizedLocation );
400404
}
401405
}
@@ -576,9 +580,6 @@ int CHudRadar::MsgFunc_HostageK(const char *pszName, int iSize, void *pbuf)
576580

577581
int CHudRadar::MsgFunc_Location(const char *pszName, int iSize, void *pbuf)
578582
{
579-
if ( gHUD.GetGameType() != GAME_CZERO )
580-
return 0;
581-
582583
BufferReader reader( pszName, pbuf, iSize );
583584

584585
int player = reader.ReadByte();

0 commit comments

Comments
 (0)