void HUD_Draw(entity this)
{
+ // if we don't know gametype and scores yet avoid drawing the scoreboard
+ // also in the very first frames, player state may be inconsistent so avoid drawing the hud at all
+ // e.g. since initial player's health is 0 hud would display the hud_damage effect,
+ // cl_deathscoreboard would show the scoreboard and so on
+ if(!gametype)
+ return;
+
if(!intermission)
if (MUTATOR_CALLHOOK(HUD_Draw_overlay))
{
if(!postinit)
PostInit();
+ if(intermission && !gameover_time)
+ gameover_time = time;
+
if(intermission && !isdemo() && !(calledhooks & HOOK_END))
{
if(calledhooks & HOOK_START)
switchweapon = Weapons_from(STAT(SWITCHWEAPON));
- f = (serverflags & SERVERFLAG_TEAMPLAY);
- if(f != teamplay)
- {
- teamplay = f;
- Scoreboard_InitScores();
- }
-
if(last_switchweapon != switchweapon)
{
weapontime = time;