Skip to content

Commit

Permalink
Scoreboard/Specs: Changed Groups for Scoreboard Search (#1545)
Browse files Browse the repository at this point in the history
Fixes #1483

When a player is dead and confirmed, you can see the search info in the
scoreboard when clicking on their name. This did not work for players
that died because they forced themselves as a spectator. This is because
of this `if/else` structure that did not handle `GROUP_SPEC`.

As there only exists these four groups:
```lua
GROUP_TERROR = 1
GROUP_NOTFOUND = 2
GROUP_FOUND = 3
GROUP_SPEC = 4
```

I decided to just changes this to an `else`. The only sideeffect is that
you are now able to click on any spectator in the scoreboard and it says
that this player has no search information available. To me this seems
like a valid solution.
  • Loading branch information
TimGoll authored Jun 2, 2024
1 parent b649673 commit 3a70105
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel
- Fixed a nil compare error in the DrawHUD function in weapon_tttbasegrenade (by @mexikoedi)
- Fixed players sometimes not receiving their role if they joined late to the game (by @TimGoll)
- Fixed weapon dryfire sound interrupting the weapon's gunshot sound (by @TW1STaL1CKY)
- Fixed scoreboard not showing any body search info on players that changed to forced spec during a round (by @TimGoll)

### Removed

Expand Down
2 changes: 1 addition & 1 deletion gamemodes/terrortown/gamemode/client/vgui/cl_sb_row.lua
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ function PANEL:SetPlayer(ply)
self.info:SetPlayer(ply)

self:InvalidateLayout()
elseif g == GROUP_FOUND or g == GROUP_NOTFOUND then
else
self.info = vgui.Create("TTTScorePlayerInfoSearch", self)
self.info:SetPlayer(ply)

Expand Down

0 comments on commit 3a70105

Please sign in to comment.