Skip to content

Commit

Permalink
Spectators no longer visible in thermalvision (#1666)
Browse files Browse the repository at this point in the history
A check was added to prevent spectators from being displayed with
thermal vision. This is relevant in cases where players are highlighted
by TV and then killed, as they are not automatically removed from the
entity list. Also prevents SpecDM players from being seen.
  • Loading branch information
MrXonte authored Oct 16, 2024
1 parent 35d18a4 commit 35450d5
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 @@ -18,6 +18,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel
- Fixed the rounds left always displaying one less than actually left (by @TimGoll)
- Fixed rendering glitches in the loading screen (by @TimGoll)
- Fixed weapon pickup through walls (by @MrXonte)
- Fixed spectating player still being visible through thermalvision after killing that player (by @MrXonte)

### Changed

Expand Down
2 changes: 1 addition & 1 deletion lua/ttt2/libraries/thermalvision.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ local function RenderHook()
local entry = thermalvisionList[i]
local ent = entry.ent

if not IsValid(ent) then
if not IsValid(ent) or (ent:IsPlayer() and not ent:IsTerror()) then
continue
end

Expand Down

0 comments on commit 35450d5

Please sign in to comment.