Repository navigation
Conversation
The stock CP data sources only create portrait and souvenir sources for clients 0-3. A player in a higher slot gets nil, the HUD fails to build and LUI retries it every frame until it runs out of memory.
The zombies scoreboard data only has rows for four players, and the stock EoG stat update reads its running total back from that table, so players in slot 4 and up never added up (slot 4 also overwrote row 0). With more than four slots, the server keeps those totals on the player and sends every player's stats to each client in ui_cp_scoreboard. The HUD reads them back, lists up to seven teammates and shows eight scoreboard rows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a zombies server with more than four slots:
Fix
ui_scripts/ZombiesPlayersbuilds the missingimage,bigImageandcoinImagesources for any client number.custom_scripts/cp/scoreboard.gsckeeps the totals of slot 4 and up on the player, and sends every player's stats to each client in theui_cp_scoreboarddvar. It is only sent when it changes, at most once a second.ui_cp_scoreboardso the value sent by the server can be read from Lua.Servers with four slots or fewer behave as before, except for the slightly tighter scoreboard rows.
Testing
Private dedicated server with eight slots, one real client and seven bots, on cp_zmb and cp_rave:
Large values (over a million cash, 70000 kills) come through unchanged. Row positions were checked in game: seven teammate rows fit above the player HUD and eight scoreboard rows end above the sticker pack.
Not covered
The end of game screen still lists four players, because its data table only has four rows.