diff options
| author | oy <Tom_Adams@web.de> | 2011-03-12 18:07:57 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-03-12 18:07:57 +0100 |
| commit | b834426548107af96c2568af22cbf8604f230965 (patch) | |
| tree | 893a04ec6b37d7b1d92ee66d39707463f48e847c /src/game/client/components/scoreboard.cpp | |
| parent | 7b98b3ddeddd34bf0fa0c84b13d928a9dafe140c (diff) | |
| download | zcatch-b834426548107af96c2568af22cbf8604f230965.tar.gz zcatch-b834426548107af96c2568af22cbf8604f230965.zip | |
fixed several problems with spectator view in game and demo player. Closes #83
Diffstat (limited to 'src/game/client/components/scoreboard.cpp')
| -rw-r--r-- | src/game/client/components/scoreboard.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/game/client/components/scoreboard.cpp b/src/game/client/components/scoreboard.cpp index a9b249ed..0d355456 100644 --- a/src/game/client/components/scoreboard.cpp +++ b/src/game/client/components/scoreboard.cpp @@ -151,11 +151,14 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch } else { - char aBuf[128]; - int Score = m_pClient->m_Snap.m_pLocalInfo->m_Score; - str_format(aBuf, sizeof(aBuf), "%d", Score); - tw = TextRender()->TextWidth(0, 48, aBuf, -1); - TextRender()->Text(0, x+w-tw-30, y, 48, aBuf, -1); + if(m_pClient->m_Snap.m_pLocalInfo) + { + char aBuf[128]; + int Score = m_pClient->m_Snap.m_pLocalInfo->m_Score; + str_format(aBuf, sizeof(aBuf), "%d", Score); + tw = TextRender()->TextWidth(0, 48, aBuf, -1); + TextRender()->Text(0, x+w-tw-30, y, 48, aBuf, -1); + } } y += 54.0f; |