Skip to content

Commit

Permalink
Fixed Last Seen Entity (#1289)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimGoll authored Jan 11, 2024
1 parent 7452abe commit 62efe04
Show file tree
Hide file tree
Showing 2 changed files with 6 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 cached weapons not being selected after giving them back to the owner (by @TimGoll)
- The roundendscreen can now be closed with the correct Binding (by @ZenBre4ker)
- Fixed last seen player being wrongly visible for every search instead of only public policing role search (by @TimGoll)

## [v0.12.3b](https://github.com/TTT-2/TTT2/tree/v0.12.3b) (2024-01-07)

Expand Down
6 changes: 5 additions & 1 deletion lua/ttt2/libraries/bodysearch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,11 @@ net.Receive("ttt2_client_reports_corpse", function(_, ply)
sceneData.lastDamage = mathRound(mathMax(0, rag.scene.lastDamage or 0))
sceneData.killFloorSurface = rag.scene.floorSurface or 0
sceneData.killWaterLevel = rag.scene.waterLevel or 0
sceneData.lastSeenEnt = rag.lastid and rag.lastid.ent or nil

-- only add last seen id if searched by public policing role
if isPublicPolicingSearch then
sceneData.lastSeenEnt = rag.lastid and rag.lastid.ent or nil
end

sceneData.killDistance = CORPSE_KILL_NO_DATA
if rag.scene.hit_trace and isvector(rag.scene.hit_trace.StartPos) then
Expand Down

0 comments on commit 62efe04

Please sign in to comment.