Skip to content

client: hud: don't overwrite teamnumber in ScoreInfo - #404

Merged
Velaron merged 1 commit into
Velaron:mainfrom
Vladislav4KZ:scoreinfo-fix
Aug 24, 2026
Merged

client: hud: don't overwrite teamnumber in ScoreInfo#404
Velaron merged 1 commit into
Velaron:mainfrom
Vladislav4KZ:scoreinfo-fix

Conversation

@Vladislav4KZ

Copy link
Copy Markdown
Contributor

Possible fix for: #402

The original CS 1.6 client does not overwrite teamnumber in MsgFunc_ScoreInfo. See the pseudocode from the decompilation of the original Steam client.so, specifically the CounterStrikeViewport::MsgFunc_ScoreInfo function:

BEGIN_READ(pbuf, iSize);
v4 = READ_BYTE();
v5 = READ_SHORT();
v6 = READ_SHORT();
playerclass = READ_SHORT();
READ_SHORT(); // <-- the team number is read here, but it is not assigned to teamnumber
if ( (unsigned __int16)(v4 - 1) > 0x3Fu )
return 1;
v7 = v4;
v8 = g_PlayerExtraInfo[v7].teamnumber >= 0;
g_PlayerExtraInfo[v7].frags = v5;
g_PlayerExtraInfo[v7].deaths = v6;
g_PlayerExtraInfo[v7].playerclass = playerclass;

@Velaron
Velaron merged commit bb60674 into Velaron:main Aug 24, 2026
8 of 9 checks passed
@Vladislav4KZ
Vladislav4KZ deleted the scoreinfo-fix branch August 24, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants