Skip to content

Commit

Permalink
check for display player when close
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiskster committed Sep 7, 2024
1 parent c369d7d commit 36706a6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/Lua/pizzaface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,14 @@ addHook("MobjThinker", function(mobj)

local beingHidden = false

if R_PointToDist(mobj.x,mobj.y) <= 100*mobj.scale
or ((mobj.cameraman and mobj.cameraman.valid) and (displayplayer.awayviewmobj == mobj.cameraman))
mobj.frame = $|CLOSE_TRANS
beingHidden = true
else
mobj.frame = $ &~CLOSE_TRANS
if displayplayer and displayplayer.valid then
if R_PointToDist(mobj.x,mobj.y) <= 100*mobj.scale
or ((mobj.cameraman and mobj.cameraman.valid) and (displayplayer.awayviewmobj == mobj.cameraman))
mobj.frame = $|CLOSE_TRANS
beingHidden = true
else
mobj.frame = $ &~CLOSE_TRANS
end
end

--Set up camera point for PFViewpoint
Expand Down

0 comments on commit 36706a6

Please sign in to comment.