Fixes and custom HUD

This commit is contained in:
Jonny_Bro (Nikita) 2023-05-20 20:04:53 +05:00
parent 744cb37c1a
commit 7fcd3cdaa1
27 changed files with 329 additions and 282 deletions

View file

@ -1,12 +1,13 @@
# Сделанные мной фиксы и добавления
* Разрешение Overdrive на сервере - Beatrun_AllowOvedriveInMultiplayer.
* Разрешение Overdrive на сервере - *Beatrun_AllowOvedriveInMultiplayer*.
* Небольшой толчёк камеры при нырянии.
* Discord Rich Presence
* Измение цвета худа - *Beatrun_HUDTextColor*, *Beatrun_HUDCornerColor*, *Beatrun_HUDFloatingXPColor*
<br>
* Фикс трёх букв из-за которых нихуя не работало.
* Быстрый поворот на земле (ПКМ пока бежишь/стоишь) включён по умолчанию (Beatrun_QuickturnGround).
* Быстрый поворот только с руками бегуна (Фикс поворотов при прицеливании и т.п.).
* Фикс ошибки запуска курса.
* Фикс использования хука (пробел по стене когда вы в воздухе) и это починило сохранение времени.
* Фикс использования хука (пробел по стене когда вы в воздухе).
* Фикс сортировки таблицы лидеров.
* Убрал ваш SteamID в углу потому что могу.

View file

@ -4,5 +4,4 @@
"title" "Beatrun"
"maps" "^br_"
"menusystem" "1"
}

View file

@ -1,19 +1,16 @@
ENT.Type = "anim"
ENT.Base = "base_entity"
ENT.PrintName = "Camp Box"
ENT.PrintName = "Anti Camp Box"
ENT.Author = ""
ENT.Information = ""
ENT.Spawnable = true
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
ENT.Category = "Beatrun"
ENT.Information = ""
ENT.Spawnable = true
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
AddCSLuaFile()
ENT.Model = "models/hunter/blocks/cube025x025x025.mdl"
ENT.IsFinish = false
function ENT:Initialize()
@ -22,7 +19,8 @@ function ENT:Initialize()
self:SetMoveType(MOVETYPE_NONE)
self:SetSolid(SOLID_BBOX)
self:SetCollisionGroup(COLLISION_GROUP_IN_VEHICLE)
self:SetCollisionBounds(Vector(-150,-150,0), Vector(150,150,150))
self:SetCollisionBounds(Vector(-150, -150, 0), Vector(150, 150, 150))
if SERVER then
self:SetTrigger(true)
end
@ -30,22 +28,24 @@ function ENT:Initialize()
self:SetPos(self:GetPos() + Vector(-0, -0, 0))
end
local screencolor = Color(64, 0, 0, 64)
-- local screencolor = Color(64, 0, 0, 64)
function ENT:StartTouch(ent)
if ent:IsPlayer() then
ent.MemeTime = CurTime()+10
ent.MemeTime = CurTime() + 10
end
end
function ENT:Touch(ent)
if ent:IsPlayer() then
if CurTime() > ent.MemeTime then
if !ent.MemeMessage then
if not ent.MemeMessage then
ent:ChatPrint("Are you having fun standing still in a parkour game? Let's spice things up a bit!")
ent.MemeMessage = true
end
if CurTime()-4 > ent.MemeTime then
ent:SetVelocity(VectorRand()*1000)
if CurTime() - 4 > ent.MemeTime then
ent:SetVelocity(VectorRand() * 1000)
end
end
end
@ -62,17 +62,13 @@ function ENT:UpdateTransmitState()
end
function ENT:Use(activator, caller, usetype)
end
function ENT:OnRemove()
end
function ENT:DrawTranslucent()
end
function ENT:Draw()
end

View file

@ -2,30 +2,29 @@ ENT.Type = "anim"
ENT.Base = "base_entity"
ENT.PrintName = "Balancing beam"
ENT.Author = ""
ENT.Information = ""
ENT.Spawnable = true
ENT.RenderGroup = RENDERGROUP_OPAQUE
ENT.Category = "Beatrun"
ENT.Information = ""
ENT.Spawnable = true
ENT.RenderGroup = RENDERGROUP_OPAQUE
AddCSLuaFile()
ENT.Model = "models/parkoursource/pipe_standard.mdl"
ENT.NoClimbing = true
ENT.Balance = true
function ENT:SetupDataTables()
self:NetworkVar( "Float", 0, "BalanceLength" )
self:NetworkVar("Float", 0, "BalanceLength")
end
function ENT:BalanceLengthExact(length)
self:SetBalanceLength(length)
local mins, maxs = Vector(-15,-6,-0), Vector(6, 6,length)
self:SetCollisionBounds(mins,maxs)
self:PhysicsInitBox(mins,maxs)
local mins, maxs = Vector(-15, -6, -0), Vector(6, 6, length)
self:SetCollisionBounds(mins, maxs)
self:PhysicsInitBox(mins, maxs)
self:SetSolid(SOLID_VPHYSICS)
self:SetCollisionGroup(SOLID_VPHYSICS)
self:EnableCustomCollisions(true)
@ -34,30 +33,33 @@ end
function ENT:Initialize()
local height = 250
if SERVER then
self:SetBalanceLength(height)
end
self:SetModel(self.Model)
local ang = self:GetAngles()
local mins, maxs = Vector(-15,-6,-0), Vector(6, 6,height)
self:SetCollisionBounds(mins,maxs)
local mins, maxs = Vector(-15, -6, -0), Vector(6, 6, height)
self:SetCollisionBounds(mins, maxs)
self:SetAngles(ang)
self:PhysicsInitBox(mins,maxs)
self:PhysicsInitBox(mins, maxs)
self:SetSolid(SOLID_VPHYSICS)
self:SetCollisionGroup(SOLID_VPHYSICS)
self:EnableCustomCollisions(true)
self:GetPhysicsObject():EnableMotion(false)
if CLIENT then
self:SetRenderBounds(mins,maxs)
self:SetRenderBounds(mins, maxs)
self.CLModel = ClientsideModel(self.Model)
self.CLModel:SetPos(self:GetPos())
self.CLModel:SetAngles(self:GetAngles())
self.CLModel:SetMaterial("medge/plain/redbrickvertex")
end
self:SetPos(self:GetPos()-self:GetAngles():Forward()*10)
self:SetPos(self:GetPos() - self:GetAngles():Forward() * 10)
end
function ENT:UpdateTransmitState()
@ -76,34 +78,39 @@ end
function ENT:Think()
if SERVER then
local ang = self:GetAngles()
if ang.x != 90 then
if ang.x ~= 90 then
ang.x = 90
self:SetAngles(ang)
end
self:NextThink(CurTime()+1)
self:NextThink(CurTime() + 1)
return true
end
if ( CLIENT ) then
if CLIENT then
local physobj = self:GetPhysicsObject()
if !IsValid(self.CLModel) then
if not IsValid(self.CLModel) then
self.CLModel = ClientsideModel(self.Model)
self.CLModel:SetPos(self:GetPos())
self.CLModel:SetAngles(self:GetAngles())
self.CLModel:SetMaterial("medge/plain/redbrickvertex")
end
if ( IsValid( physobj ) ) then
physobj:SetPos( self:GetPos() )
physobj:SetAngles( self:GetAngles() )
self.CLModel:SetPos( self:GetPos() )
self.CLModel:SetAngles( self:GetAngles() )
if IsValid(physobj) then
physobj:SetPos(self:GetPos())
physobj:SetAngles(self:GetAngles())
local mins, maxs = physobj:GetAABB()
self.CLModel:SetPos(self:GetPos())
self.CLModel:SetAngles(self:GetAngles())
local _, maxs = physobj:GetAABB()
local cmins, cmaxs = self:GetCollisionBounds()
if maxs.z != cmaxs.z then
self:PhysicsInitBox(cmins,cmaxs)
if maxs.z ~= cmaxs.z then
self:PhysicsInitBox(cmins, cmaxs)
self:SetSolid(SOLID_VPHYSICS)
self:SetCollisionGroup(SOLID_VPHYSICS)
self:EnableCustomCollisions(true)
@ -111,7 +118,7 @@ function ENT:Think()
end
else
local cmins, cmaxs = self:GetCollisionBounds()
self:PhysicsInitBox(cmins,cmaxs)
self:PhysicsInitBox(cmins, cmaxs)
self:SetSolid(SOLID_VPHYSICS)
self:SetCollisionGroup(SOLID_VPHYSICS)
self:EnableCustomCollisions(true)
@ -123,39 +130,46 @@ end
function ENT:Draw()
local pos = self:GetPos()
local ang = self:GetAngles()
local oldz = pos.z
local old = pos
-- local oldz = pos.z
-- local old = pos
local mins, maxs = self:GetCollisionBounds()
maxs.z = self:GetBalanceLength()
local num = maxs.z/250
local numc = math.floor(num)
local extra = num-numc
if !IsValid(self.CLModel) then
local num = maxs.z / 250
local numc = math.floor(num)
local extra = num - numc
if not IsValid(self.CLModel) then
self.CLModel = ClientsideModel(self.Model)
self.CLModel:SetPos(self:GetPos())
self.CLModel:SetAngles(self:GetAngles())
self.CLModel:SetMaterial("medge/plain/redbrickvertex")
end
self:SetRenderBounds(mins,maxs)
self:SetRenderBounds(mins, maxs)
-- render.DrawWireframeBox(pos, ang, mins, maxs)
for i=0, numc do
for i = 0, numc do
pos = self:GetPos()
if num == 1 then
self.CLModel:DrawModel()
break
end
if i==numc then
pos = pos + ang:Up()*(250*(i-1))
if i>0 then
pos = pos + ang:Up()*(250*extra)
if i == numc then
pos = pos + ang:Up() * (250 * (i - 1))
if i > 0 then
pos = pos + ang:Up() * (250 * extra)
end
self.CLModel:SetPos(pos)
self.CLModel:SetupBones()
self.CLModel:DrawModel()
else
pos = pos + ang:Up()*(250*i)
pos = pos + ang:Up() * (250 * i)
self.CLModel:SetPos(pos)
self.CLModel:SetupBones()
self.CLModel:DrawModel()

View file

@ -2,47 +2,47 @@ ENT.Type = "anim"
ENT.Base = "base_entity"
ENT.PrintName = "Cube"
ENT.Author = ""
ENT.Information = ""
ENT.Spawnable = true
ENT.RenderGroup = RENDERGROUP_OPAQUE
ENT.Category = "Beatrun"
ENT.Information = ""
ENT.Spawnable = true
ENT.RenderGroup = RENDERGROUP_OPAQUE
AddCSLuaFile()
ENT.Model = "models/hunter/blocks/cube025x025x025.mdl"
local mat
if CLIENT then
mat = CreateMaterial("blockmeasure", "VertexLitGeneric", {["$basetexture"]="dev/reflectivity_50b", ["$color2"]=Vector(0,1,0)})
end
local reflec = Material("dev/reflectivity_50b")
function ENT:SetupDataTables()
if CLIENT then
mat = CreateMaterial("blockmeasure", "VertexLitGeneric", {
["$basetexture"] = "dev/reflectivity_50b",
["$color2"] = Vector(0, 1, 0)
})
end
-- local reflec = Material("dev/reflectivity_50b")
function ENT:SetupDataTables()
end
function ENT:Initialize()
-- if ( CLIENT ) then return end -- We only want to run this code serverside
if CLIENT then
if tcmat and !tcmat["blockmeasure"] then
if tcmat and not tcmat["blockmeasure"] then
tcmat["blockmeasure"] = mat
tcmatshaders["blockmeasure"] = 1
end
end
self:PhysicsInitBox(Vector(0,0,0), Vector(100,100,1000))
-- Set up solidity and movetype
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:EnableCustomCollisions( true )
self:PhysicsInitBox(Vector(0, 0, 0), Vector(100, 100, 1000))
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:EnableCustomCollisions(true)
self:GetPhysicsObject():EnableMotion(false)
end
function ENT:OnRemove()
end
function ENT:DrawTranslucent()
@ -50,25 +50,29 @@ end
function ENT:Think()
if SERVER then
self:NextThink(CurTime()+1)
self:NextThink(CurTime() + 1)
return true
end
if ( CLIENT ) then
if CLIENT then
local physobj = self:GetPhysicsObject()
if ( IsValid( physobj ) ) then
physobj:SetPos( self:GetPos() )
physobj:SetAngles( self:GetAngles() )
if IsValid(physobj) then
physobj:SetPos(self:GetPos())
physobj:SetAngles(self:GetAngles())
end
end
end
local matrix
local vecscale
-- local matrix
-- local vecscale
function ENT:Draw()
local mins, maxs = self:GetCollisionBounds()
self:SetRenderBounds(mins, maxs)
render.SetMaterial(mat)
render.DrawBox(self:GetPos(), self:GetAngles(), mins, maxs, color_white)
end

View file

@ -2,25 +2,22 @@ ENT.Type = "anim"
ENT.Base = "base_entity"
ENT.PrintName = "Data Bank"
ENT.Author = ""
ENT.Information = ""
ENT.Spawnable = true
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
ENT.Category = "Beatrun"
ENT.Information = ""
ENT.Spawnable = true
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
AddCSLuaFile()
ENT.Model = "models/hunter/blocks/cube025x025x025.mdl"
ENT.IsFinish = false
function ENT:SetupDataTables()
end
local minb, maxb = Vector(-75, -75, 0), Vector(75, 75, 100)
function ENT:Initialize()
self:SetModel(self.Model)
self:DrawShadow(false)
@ -28,6 +25,7 @@ function ENT:Initialize()
self:SetSolid(SOLID_BBOX)
self:SetCollisionGroup(COLLISION_GROUP_IN_VEHICLE)
self:SetCollisionBounds(minb, maxb)
if CLIENT then
self:SetRenderBounds(minb, maxb)
self.offset = 0
@ -38,13 +36,16 @@ function ENT:Initialize()
self:SetPos(self:GetPos() + Vector(-0, -0, 0))
end
local screencolor = Color(64, 0, 0, 64)
-- local screencolor = Color(64, 0, 0, 64)
function ENT:StartTouch(ent)
if ent:IsPlayer() and ent:GetNW2Entity("DataBank") == self and ent:GetNW2Int("DataCubes", 0) > 0 then
ent:SetNW2Int("DataBanked", ent:GetNW2Int("DataBanked", 0) + math.min(ent:GetNW2Int("DataCubes"), 5))
ent:SetNW2Int("DataCubes", math.max(ent:GetNW2Int("DataCubes")-5, 0))
ent:SetNW2Int("DataCubes", math.max(ent:GetNW2Int("DataCubes") - 5, 0))
ent:DataTheft_Bank()
self:EmitSound("mirrorsedge/ui/ME_UI_hud_select.wav", 60, 100+math.random(-10,5))
self:EmitSound("mirrorsedge/ui/ME_UI_hud_select.wav", 60, 100 + math.random(-10, 5))
end
end
@ -53,70 +54,84 @@ function ENT:UpdateTransmitState()
end
function ENT:Use(activator, caller, usetype)
end
function ENT:OnRemove()
end
local radius = 75
local red = Color(200, 200, 200, 200)
local circlepos = Vector()
local circleup = Vector(0,0,25)
local circleup = Vector(0, 0, 25)
function ENT:DrawTranslucent()
local db = LocalPlayer():GetNW2Entity("DataBank")
if IsValid(db) and db == self then
self:SetRenderBounds(minb, maxb)
render.SetColorMaterial()
red.a = math.Clamp(LocalPlayer():GetPos():Distance(self:GetPos()) * 0.2, 25, 200)
for i=0, 16 do
local angle = i * math.pi*2 / 16 + self.offset
circlepos:SetUnpacked(math.cos(angle)*radius, math.sin(angle)*radius, 0)
local newpos = self:GetPos()+circlepos
render.DrawBeam(newpos, newpos+circleup, 8, 0, 1, red, true)
for i = 0, 16 do
local angle = i * math.pi * 2 / 16 + self.offset
circlepos:SetUnpacked(math.cos(angle) * radius, math.sin(angle) * radius, 0)
local newpos = self:GetPos() + circlepos
render.DrawBeam(newpos, newpos + circleup, 8, 0, 1, red, true)
end
-- local bmin, bmax = self:GetRenderBounds()
-- render.DrawWireframeBox(self:GetPos(), angle_zero, bmin, bmax)
self.offset = self.offset + (0.00075)
self.offset = self.offset + 0.00075
if self.offset >= 180 then
self.offset = 0
end
end
end
function ENT:Draw()
end
local vecup = Vector(0,0,50)
local vecup = Vector(0, 0, 50)
hook.Add("HUDPaint", "DataBank", function()
local db = LocalPlayer():GetNW2Entity("DataBank")
if IsValid(db) then
local pos = db:GetPos()
pos:Add(vecup)
local w2s = pos:ToScreen()
if w2s.visible then
surface.SetTextColor(200,200,200)
surface.SetTextColor(200, 200, 200)
surface.SetFont("BeatrunHUD")
local tw, th = surface.GetTextSize("Deposit")
surface.SetTextPos(w2s.x-(tw*0.5), w2s.y)
local tw, _ = surface.GetTextSize("Deposit")
surface.SetTextPos(w2s.x - (tw * 0.5), w2s.y)
surface.DrawText("Deposit")
end
end
end)
local player = FindMetaTable("Player")
if SERVER then
function player:DataTheft_Bank()
local dbtbl = ents.FindByClass("br_databank")
local bank = dbtbl[1]
while self:GetNW2Entity("DataBank") == bank do
table.Shuffle(dbtbl)
bank = dbtbl[1]
end
if bank then
self:SetNW2Entity("DataBank", bank)
end

View file

@ -350,7 +350,7 @@ end
local tr = {}
local tr_result = {}
local allow_overdrive = CreateClientConVar("Beatrun_AllowOvedriveInMultiplayer", "0", false, false, "Allow ovedrive on servers")
local allow_overdrive = CreateConVar("Beatrun_AllowOvedriveInMultiplayer", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
function SWEP:PrimaryAttack()
local ply = self.Owner

View file

@ -191,12 +191,10 @@ local function TutorialMarker()
markerup[3] = markerup[3] + 50 + math.sin(CurTime() * 4) * 5
cam.Start3D2D(markerup - ang:Right() * 13, ang, 1)
surface.SetFont("BeatrunHUD")
surface.SetTextPos(0, 0)
surface.SetTextColor(markercol)
surface.DrawText("")
cam.End3D2D()
end
end
@ -222,7 +220,6 @@ local function CreditsThink()
if gui.IsGameUIVisible() then return end
cam.Start2D()
local data = creditslist[curcredit]
surface.SetDrawColor(0, 0, 0)
@ -247,7 +244,6 @@ local function CreditsThink()
RunConsoleCommand("disconnect")
end
end
cam.End2D()
return true

View file

@ -113,8 +113,8 @@ function GenerateBuildModeRT(model)
dummy:SetModel(model)
local sicon = PositionSpawnIcon(dummy, vector_origin)
cam.Start3D(sicon.origin, sicon.angles, sicon.fov)
cam.Start3D(sicon.origin, sicon.angles, sicon.fov)
render.Clear(0, 0, 0, 0)
render.ClearDepth()
render.SetWriteDepthToDestAlpha(false)

View file

@ -172,7 +172,6 @@ function DrawDeletionText()
local _, th = surface.GetTextSize(deletionstringc)
cam.Start2D()
local num = 0
local ply = LocalPlayer()
local vp = ply:GetViewPunchAngles()
@ -204,7 +203,7 @@ function DrawDeletionText()
surface.SetTextPos(ScrW() * 0.01 + vp.x, ScrH() * 0.05 + num * th + vp.y)
surface.DrawText(deletionstringc)
end
cam.End2D()
GlitchIntensity = oldgi
end

View file

@ -72,13 +72,13 @@ end
local function RenderTraces()
cam.Start3D()
for k, v in ipairs(traces) do
render.DrawLine(v[1], v[2], v[3], true)
end
cam.End3D()
TraceCount = #traces
table.Empty(traces)
end

View file

@ -47,7 +47,6 @@ function DiscordUpdate()
rpc_data["largeImageKey"] = image
rpc_data["largeImageText"] = course
print("UPDATING DISCORD RPC")
DiscordUpdateRPC(rpc_data)
end

View file

@ -7,6 +7,10 @@ local packetloss = Material("vgui/packetloss.png")
local lastloss = 0
local MELogo = Material("vgui/MELogo.png", "mips smooth")
CreateClientConVar("Beatrun_HUDTextColor", "255 255 255 255", true, true, "HUD Text Color\nDefault: 255 255 255 255")
CreateClientConVar("Beatrun_HUDCornerColor", "20 20 20 100", true, true, "HUD Left Corner Color\nDefault: 20 20 20 100")
CreateClientConVar("Beatrun_HUDFloatingXPColor", "255 255 255 255", true, true, "HUD Floating XP Color\nDefault: 255 255 255 255")
local hide = {
CHudBattery = true,
CHudHealth = true,
@ -106,9 +110,12 @@ local function DrawBlurRect(x, y, w, h, a)
for i = 1, 2 do
blur:SetFloat("$blur", i / 3 * 5)
blur:Recompute()
render.UpdateScreenEffectTexture()
render.SetScissorRect(x, y, x + w, y + h, true)
surface.DrawTexturedRect(X * -1, Y * -1, ScrW(), ScrH())
render.SetScissorRect(0, 0, 0, 0, false)
end
end
@ -174,8 +181,11 @@ local function BeatrunHUD()
end
surface.SetFont("BeatrunHUDSmall")
local nickw, nickh = surface.GetTextSize(nicktext)
surface.SetFont("BeatrunHUD")
local coursew, _ = surface.GetTextSize(coursename)
local bgpadw = nickw
-- local bgpadh = nickh
@ -193,15 +203,25 @@ local function BeatrunHUD()
hidealpha = 0
end
surface.SetDrawColor(20, 20, 20, math.max(150 - hidealpha, 50))
local corner_color_c = string.ToColor(LocalPlayer():GetInfo("Beatrun_HUDCornerColor"))
corner_color_c.a = math.Clamp(corner_color_c.a + 50, 0, 255)
corner_color_c.a = dynamic:GetBool() and math.max(150 - hidealpha, 50) or corner_color_c.a
surface.SetDrawColor(corner_color_c)
surface.DrawRect(-20 + vp.z, scrh * 0.895 + vp.x, 40, SScaleY(85))
DrawBlurRect(20 + vp.z, scrh * 0.895 + vp.x, SScaleX(bgpadding), SScaleY(85), math.max(255 - hidealpha, 2))
surface.SetDrawColor(20, 20, 20, math.max(100 - hidealpha, 50))
local corner_color = string.ToColor(LocalPlayer():GetInfo("Beatrun_HUDCornerColor"))
corner_color.a = dynamic:GetBool() and math.max(100 - hidealpha, 50) or corner_color.a
local text_color = string.ToColor(LocalPlayer():GetInfo("Beatrun_HUDTextColor"))
text_color.a = dynamic:GetBool() and math.max(255 - hidealpha, 2) or text_color.a
surface.SetDrawColor(corner_color)
surface.DrawOutlinedRect(20 + vp.z, scrh * 0.895 + vp.x, SScaleX(bgpadding), SScaleY(85))
surface.SetFont("BeatrunHUD")
surface.SetTextColor(255, 255, 255, math.max(255 - hidealpha, 2))
surface.SetTextColor(text_color)
surface.SetTextPos(scrw * 0.015 + vp.z, scrh * 0.9 + vp.x)
surface.DrawText("Lv." .. ply:GetLevel())
@ -219,12 +239,15 @@ local function BeatrunHUD()
surface.DrawText(nicktext)
surface.SetDrawColor(25, 25, 25, math.max(255 - hidealpha, 2))
surface.DrawRect(scrw * 0.015 + vp.z, scrh * 0.94 + 1 + vp.x, SScaleX(150), SScaleY(4))
surface.SetDrawColor(255, 255, 255, math.max(255 - hidealpha, 2))
surface.SetDrawColor(string.ToColor(LocalPlayer():GetInfo("Beatrun_HUDTextColor")), math.max(255 - hidealpha, 2))
surface.DrawRect(scrw * 0.015 + vp.z, scrh * 0.94 + vp.x, SScaleX(150 * math.min(ply:GetLevelRatio(), 1)), SScaleY(5))
for k, v in pairs(XP_floatingxp) do
local floating_color = string.ToColor(LocalPlayer():GetInfo("Beatrun_HUDFloatingXPColor"))
floating_color.a = math.Clamp(1000 * math.abs(CurTime() - k) / 5 - hidealpha, 0, 255)
surface.SetFont("BeatrunHUD")
surface.SetTextColor(255, 255, 255, math.Clamp(1000 * math.abs(CurTime() - k) / 5 - hidealpha, 0, 255))
surface.SetTextColor(floating_color)
surface.SetTextPos(scrw * 0.015 + vp.z + nickw + 3, scrh * 0.92 + vp.x + nickh - 42 + 50 * math.abs(CurTime() - k) / 5)
surface.DrawText(v)
@ -234,8 +257,12 @@ local function BeatrunHUD()
end
end
local text_color_c = string.ToColor(LocalPlayer():GetInfo("Beatrun_HUDTextColor"))
text_color_c.a = text_color_c.a - 55
text_color_c.a = dynamic:GetBool() and math.max(200 - hidealpha, 2) or text_color_c.a
surface.SetFont("BeatrunHUD")
surface.SetTextColor(255, 255, 255, math.max(200 - hidealpha, 2))
surface.SetTextColor(text_color_c)
surface.SetTextPos(scrw * 0.015 + vp.z, scrh * 0.95 + vp.x)
surface.DrawText(coursename)
end

View file

@ -1213,7 +1213,6 @@ local function JumpArmDraw(a, b, c)
BodyAnimMDLarm:SetPos(pos)
bac:SetupBones()
BodyAnimMDLarm:DrawModel()
cam.End3D()
else
local armoff = LocalToWorld(armoffset, angle_zero, vector_origin, BodyAnim:GetAngles())

View file

@ -570,7 +570,9 @@ local function BlindnessPreUI()
if blinded then
cam.Start3D()
render.Clear(10, 10, 10, 0)
cam.End3D()
draw.NoTexture()
end
end

View file

@ -227,10 +227,6 @@ function CourseHUD()
local vpx = vp.x
local vpz = vp.z
local incourse = Course_Name ~= ""
surface.SetFont("DermaLarge")
surface.SetTextColor(255, 255, 255, 255)
local totaltime = CheckpointNumber ~= -1 and math.max(0, CurTime() - Course_StartTime) or Course_EndTime
if incourse then
@ -249,6 +245,10 @@ function CourseHUD()
text = speed .. " km/h"
w, _ = surface.GetTextSize(text)
surface.SetDrawColor(255, 255, 255, 255)
surface.SetFont("BeatrunHUD")
surface.SetTextColor(255, 255, 255, 255)
surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.85 + vpz)
surface.DrawText(text)
end

View file

@ -21,9 +21,7 @@ if CLIENT then
if ply:GetGrappling() then
cam.Start3D()
local w2s = ply:GetGrapplePos():ToScreen()
cam.End3D()
surface.SetDrawColor(255, 255, 255)
@ -40,9 +38,7 @@ if CLIENT then
if trout.Fraction > 0 and dist < 2750000 and dist > 90000 then
cam.Start3D()
local w2s = trout.HitPos:ToScreen()
cam.End3D()
surface.SetDrawColor(255, 255, 255)
@ -57,7 +53,7 @@ local zpunchstart = Angle(2, 0, 0)
hook.Add("SetupMove", "Grapple", function(ply, mv, cmd)
if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then return end
if not ply:Alive() or Course_Name ~= "" then return end
if GetGlobalBool(GM_INFECTION) and not ply:GetNW2Entity("Swingrope") then return end
if GetGlobalBool(GM_INFECTION) --[[and not ply:GetNW2Entity("Swingrope")]] then return end
local activewep = ply:GetActiveWeapon()
local usingrh = IsValid(activewep) and activewep:GetClass() == "runnerhands"

View file

@ -719,8 +719,8 @@ if CLIENT then
mousex = 0
-- local mousemoved = false
local camcontrol = false
local scrw = ScrW()
local scrh = ScrH()
-- local scrw = ScrW()
-- local scrh = ScrH()
-- local nscrw = ScrW()
-- local nscrh = ScrH()
local aimvector = Vector()
@ -761,7 +761,7 @@ if CLIENT then
size = ScreenScale(10)
})
local blur = Material("pp/blurscreen")
-- local blur = Material("pp/blurscreen")
--[[
local function DrawBlurRect(x, y, w, h)