ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.7k stars 624 forks source link

Message "Couldn't open file overviews..." is getting displayed 2 times. #2604

Open metita opened 5 years ago

metita commented 5 years ago

Example:

BUILD 8303 SERVER (0 CRC) Server # 652 Esval connected Couldn't open file overviews/test_map.txt. Using default values for overiew mode. Couldn't open file overviews/test_map.txt. Using default values for overiew mode. VAC secure mode disabled. Esval is joining the Counter-Terrorist force Scoring will not start until both teams have players

This one also: "... Using default values for overiew mode" has a typo on overiew -> overview

https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/cl_dll/hud_spectator.cpp#L1281-L1285

https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dmc/cl_dll/hud_spectator.cpp#L971-L975

https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dmc/cl_dll/hud_spectator.cpp#L1018-L1021

https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dmc/cl_dll/hud_spectator.cpp#L1057

https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dmc/cl_dll/hud_spectator.cpp#L346

https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/cl_dll/hud_spectator.cpp#L577

https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/cl_dll/hud_spectator.cpp#L1426

unkown -> unknown

There are several unkown typo on hud_spectator.cpp.

afwn90cj93201nixr2e1re commented 5 years ago

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

metita commented 5 years ago

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

Sent with GitHawk

metita commented 5 years ago

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

afwn90cj93201nixr2e1re commented 5 years ago

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).

metita commented 5 years ago

@afwn90cj93201nixr2e1re ...

Multiplayer real server: image

... image

afwn90cj93201nixr2e1re commented 5 years ago

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

afwn90cj93201nixr2e1re commented 5 years ago

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.

metita commented 5 years ago

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

afwn90cj93201nixr2e1re commented 5 years ago

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

metita commented 5 years ago

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

afwn90cj93201nixr2e1re commented 5 years ago

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

metita commented 5 years ago

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.

afwn90cj93201nixr2e1re commented 5 years ago

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

metita commented 5 years ago

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

... first attempt connecting to a multiplayer server image

GiovaniFerraroTrivelli commented 5 years ago

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

SamVanheer commented 5 years ago

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.

metita commented 5 years ago

@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

SamVanheer commented 5 years ago

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.

RauliTop commented 5 years ago

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

metita commented 5 years ago

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?

RauliTop commented 5 years ago

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.