I don't know if any of you out there who run the classic Prop Hunt gamemode are tired of this issue, but certain maps on the Workshop failed to enclose the map in a skybox (I [I]think[/I] that's the issue at least). So when the hunters are "blinded" by putting the camera far below the map, the 'jiggling screen' notorious of void leaks happens. I re-coded an entire section of cl_init which draws a black box over the screen to blind hunters, thereby covering up any camera view issues caused by void leaks when blinded.
[code]
// Draw round timeleft and hunter release timeleft
function HUDPaint()
local ply = LocalPlayer()
if GetGlobalBool("InRound", false) then
local blindlock_time_left = (GetConVar("HUNTER_BLINDLOCK_TIME"):GetInt() - (CurTime() - GetGlobalFloat("RoundStartTime", 0))) + 1
if blindlock_time_left < 1 && blindlock_time_left > -6 then
blindlock_time_left_msg = "Hunters have been released!"
elseif blindlock_time_left > 0 then
if ply:Team() == TEAM_HUNTERS then
draw.RoundedBox(0, 0, 0, ScrW(), ScrH(), Color(0, 0, 0, 255))
end
blindlock_time_left_msg = "Hunters will be unblinded and released in "..string.ToMinutesSeconds(blindlock_time_left)
else
blindlock_time_left_msg = nil
end
if blindlock_time_left_msg then
surface.SetFont("MyFont")
local tw, th = surface.GetTextSize(blindlock_time_left_msg)
draw.RoundedBox(8, 20, 20, tw + 20, 26, Color(0, 0, 0, 75))
draw.DrawText(blindlock_time_left_msg, "MyFont", 31, 26, Color(255, 255, 0, 255), TEXT_ALIGN_LEFT)
end
end
end
hook.Add("HUDPaint", "PH_HUDPaint", HUDPaint)
[/code]
I hope you guys find this helpful!
[QUOTE=therealist;45486004]I don't know if any of you out there who run the classic Prop Hunt gamemode are tired of this issue, but certain maps on the Workshop failed to enclose the map in a skybox (I [I]think[/I] that's the issue at least). So when the hunters are "blinded" by putting the camera far below the map, the 'jiggling screen' notorious of void leaks happens. I re-coded an entire section of cl_init which draws a black box over the screen to blind hunters, thereby covering up any camera view issues caused by void leaks when blinded.
[code]
// Draw round timeleft and hunter release timeleft
function HUDPaint()
local ply = LocalPlayer()
if GetGlobalBool("InRound", false) then
local blindlock_time_left = (GetConVar("HUNTER_BLINDLOCK_TIME"):GetInt() - (CurTime() - GetGlobalFloat("RoundStartTime", 0))) + 1
if blindlock_time_left < 1 && blindlock_time_left > -6 then
blindlock_time_left_msg = "Hunters have been released!"
elseif blindlock_time_left > 0 then
if ply:Team() == TEAM_HUNTERS then
draw.RoundedBox(0, 0, 0, ScrW(), ScrH(), Color(0, 0, 0, 255))
end
blindlock_time_left_msg = "Hunters will be unblinded and released in "..string.ToMinutesSeconds(blindlock_time_left)
else
blindlock_time_left_msg = nil
end
if blindlock_time_left_msg then
surface.SetFont("MyFont")
local tw, th = surface.GetTextSize(blindlock_time_left_msg)
draw.RoundedBox(8, 20, 20, tw + 20, 26, Color(0, 0, 0, 75))
draw.DrawText(blindlock_time_left_msg, "MyFont", 31, 26, Color(255, 255, 0, 255), TEXT_ALIGN_LEFT)
end
end
end
hook.Add("HUDPaint", "PH_HUDPaint", HUDPaint)
[/code]
I hope you guys find this helpful![/QUOTE]
What if you pull up the menu? You'll see the world through the menu still? HUDPaint doesnt run with the menu up...
As far as I can tell... pressing ESC to call up the server list, pressing F1 to vote for gamemode change, pressing F2 to switch teams and typing !menu to get up the ULX Admin xgui panel do not cause the world to show through. HUDPaint was part of the gamemode itself already. I only added about four lines of code to all of what you see up there. My code draws a black box covering the entire screen, which I believe totally prevents the player from seeing the void.
I suppose I should point out that these are the changes, and that everything else is from the original cl_init.lua:
[code]
local ply = LocalPlayer()
[/code]
and
[code]
if ply:Team() == TEAM_HUNTERS then
draw.RoundedBox(0, 0, 0, ScrW(), ScrH(), Color(0, 0, 0, 255))
end
[/code]
Sorry, you need to Log In to post a reply to this thread.