Halflife: Message "Couldn't open file overviews..." is getting displayed 2 times.

Created on 20 Jul 2019  路  21Comments  路  Source: ValveSoftware/halflife

Most helpful comment

This happens because the client receives 2 network messages: ResetHUD and then InitHUD.

Both of them eventually call CHudSpectator::Reset. That in and of itself is not the cause of this problem.
The cause is that when InitHUD is received it initializes the Spectator hud, which wipes all data, including overview data:
https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/cl_dll/hud_spectator.cpp#L1964

This matters because the Spectator hud decides whether to load the overview based on one of its members:
https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/cl_dll/hud_spectator.cpp#L1937-L1942

So when ResetHUD is received it calls CHudSpectator::Reset, which then does the overview loading.
Then InitHUD is received, all data is reset and then it calls CHudSpectator::Reset which thinks it's the first time running that code and tries to load the overview again.

Since this code is obviously meant to load overviews once per map it might be a good idea to rework it so the map name isn't reset, but then overview data will need to be either retained after a level change if it's a restart or the hud will need to know if it's restarting and reload the data anyway based on that.

Alternatively, since InitHUD is supposed to be executed once per player per map the ResetHUD message could be made to not load the overview and instead rely solely on InitHUD to do so.

This would require the code in CHudSpectator::Reset to be carefully separated out so only the code used to load data is removed, and the code to reset the hud is kept.

All 21 comments

Is it local server? If it is, then there no problem.

It is not, tested locally and on a multiplayer server.

Sent with GitHawk

Scoring will not start until both teams have players is getting displayed 2 times but only when rounds have concluded.

BUILD 8303 SERVER (0 CRC)
Server # 667
Esval connected
Esval is joining the Counter-Terrorist force
Scoring will not start until both teams have players

--->

] kill
Esval died
Scoring will not start until both teams have players
Scoring will not start until both teams have players

image

You said that's not local server, but you run it from new game and it's local. There 2 times coz 1 time on client second time on gamedll(server).

@afwn90cj93201nixr2e1re ...

Multiplayer real server:
image

...
image

Gonna test it. Wait. I haven't seen it on april updates.

Connecting to 131.221.35.235:27025...
Connection accepted by 131.221.35.235:27025
[Extra Mirror] blocked: "echo "* Privileges set""

BUILD 7882 SERVER (0 CRC)
Server # 10
[Extra Mirror] execute: "_1201112204194222612"
[Extra Mirror] blocked: "fullserverinfo "\*gamedir\cstrike""
[Extra Mirror] Start CheckFileList:
sprites/scope_arc.tga
sprites/scope_arc_nw.tga
sprites/scope_arc_ne.tga
sprites/scope_arc_sw.tga
sprites/smokepuff.spr
models/player.mdl
models/player/leet/leet.mdl
models/player/gign/gign.mdl
models/player/vip/vip.mdl
models/player/gsg9/gsg9.mdl
models/player/guerilla/guerilla.mdl
models/player/arctic/arctic.mdl
models/player/sas/sas.mdl
models/player/terror/terror.mdl
models/player/urban/urban.mdl
models/p_ak47.mdl
models/p_aug.mdl
models/p_awp.mdl
models/p_c4.mdl
models/w_c4.mdl
models/p_deagle.mdl
models/shield/p_shield_deagle.mdl
models/p_flashbang.mdl
models/shield/p_shield_flashbang.mdl
models/p_hegrenade.mdl
models/shield/p_shield_hegrenade.mdl
models/p_glock18.mdl
models/shield/p_shield_glock18.mdl
models/p_p228.mdl
models/shield/p_shield_p228.mdl
models/p_smokegrenade.mdl
models/shield/p_shield_smokegrenade.mdl
models/p_usp.mdl
models/shield/p_shield_usp.mdl
models/p_fiveseven.mdl
models/shield/p_shield_fiveseven.mdl
models/p_knife.mdl
models/shield/p_shield_knife.mdl
models/w_flashbang.mdl
models/w_hegrenade.mdl
models/p_sg550.mdl
models/p_g3sg1.mdl
models/p_m249.mdl
models/p_m3.mdl
models/p_m4a1.mdl
models/p_mac10.mdl
models/p_mp5.mdl
models/p_ump45.mdl
models/p_p90.mdl
models/p_scout.mdl
models/p_sg552.mdl
models/w_smokegrenade.mdl
models/p_tmp.mdl
models/p_elite.mdl
models/p_xm1014.mdl
models/p_galil.mdl
models/p_famas.mdl
sprites/black_smoke1.spr
sprites/black_smoke2.spr
sprites/black_smoke3.spr
sprites/black_smoke4.spr
sprites/fast_wallpuff1.spr
[Extra Mirror] End CheckFileList
Error: server failed to transmit file 'sound/misc/usc.wav'
[Extra Mirror] [VoiceInit]  [Blocked]
[Extra Mirror] [VoiceInit] voice_speex [Execute]
This is very long name at all ! connected
Couldn't open file overviews/awp_map.txt. Using default values for overiew mode.
<html>
<head>
<title>Motd server</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #000000;
}
-->
</style>
</head>
<body>
<img src="http://w3.levelup.cl/imagenes_motd/cs.png" width="100" height="100" 
border="0" align="center">
</body>
</html>

Can't reproduce.
It's separate check's.
If file isn't downloaded at first connect and on reconnect it's show old conprint from queue.

No idea, this is happening on my end in a vanilla installation.

Just retry/reconnect to same server. And you gonna see only one message after map 'been downloaded.

If you connect to it for the first time, you will get double message but if you use retry you will get that message one time.

image

It's separate check's.
If file isn't downloaded at first connect and on reconnect it's show old conprint from queue.

There is no need to show that message more than one time, if you are going to check it then there is no need to display another print.

:/ did you read my prev. msg? That's not a bug. You connecting 2 times.

:/ did you read my prev. msg? That's not a bug. You connecting 2 times.

... first attempt connecting to a multiplayer server
image

Can confirm. This happens on your first connection to a multiplayer server.

This happens because the client receives 2 network messages: ResetHUD and then InitHUD.

Both of them eventually call CHudSpectator::Reset. That in and of itself is not the cause of this problem.
The cause is that when InitHUD is received it initializes the Spectator hud, which wipes all data, including overview data:
https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/cl_dll/hud_spectator.cpp#L1964

This matters because the Spectator hud decides whether to load the overview based on one of its members:
https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/cl_dll/hud_spectator.cpp#L1937-L1942

So when ResetHUD is received it calls CHudSpectator::Reset, which then does the overview loading.
Then InitHUD is received, all data is reset and then it calls CHudSpectator::Reset which thinks it's the first time running that code and tries to load the overview again.

Since this code is obviously meant to load overviews once per map it might be a good idea to rework it so the map name isn't reset, but then overview data will need to be either retained after a level change if it's a restart or the hud will need to know if it's restarting and reload the data anyway based on that.

Alternatively, since InitHUD is supposed to be executed once per player per map the ResetHUD message could be made to not load the overview and instead rely solely on InitHUD to do so.

This would require the code in CHudSpectator::Reset to be carefully separated out so only the code used to load data is removed, and the code to reset the hud is kept.

@SamVanheer that should not apply to this message being displayed 2 times too right?

Scoring will not start until both teams have players
Scoring will not start until both teams have players

There's probably some code calling CHalfLifeMultiplay::CheckWinConditions again after the call in CBasePlayer::Killed. It doesn't keep track of whether it has printed that already so it just does it again.

Not too much important.
Also, you pay more attention to the error if it's printing two times (hahaha... joke驴?)

It might be fixed only if an easy fix will be found

Not too much important.
Also, you pay more attention to the error if it's printing two times (hahaha... joke驴?)

It might be fixed only if an easy fix will be found

Not really but seems weird that a specific message is being displayed two times which seems redundant. As @SamVanheer said, ResetHUD message should not load overviews but InitHUD.

I know this is not that important but should be fixed eventually, halflife Github was made for a reason, post issues, feature request, etc. They can fix it whenever they want.

At the end of the day we are trying to polish the game, aren't we?

At the end of the day we are trying to polish the game, aren't we?

Yes, that's what I tried to said on the last line.

But we know that this issue isn't really important.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Yetoo1 picture Yetoo1  路  3Comments

WhiteFang1319 picture WhiteFang1319  路  3Comments

BlackShadow picture BlackShadow  路  3Comments

ArmynC picture ArmynC  路  3Comments

BlackShadow picture BlackShadow  路  3Comments