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 * Discord Rich Presence
* Измение цвета худа - *Beatrun_HUDTextColor*, *Beatrun_HUDCornerColor*, *Beatrun_HUDFloatingXPColor*
<br>
* Фикс трёх букв из-за которых нихуя не работало. * Фикс трёх букв из-за которых нихуя не работало.
* Быстрый поворот на земле (ПКМ пока бежишь/стоишь) включён по умолчанию (Beatrun_QuickturnGround). * Быстрый поворот на земле (ПКМ пока бежишь/стоишь) включён по умолчанию (Beatrun_QuickturnGround).
* Быстрый поворот только с руками бегуна (Фикс поворотов при прицеливании и т.п.). * Быстрый поворот только с руками бегуна (Фикс поворотов при прицеливании и т.п.).
* Фикс ошибки запуска курса. * Фикс ошибки запуска курса.
* Фикс использования хука (пробел по стене когда вы в воздухе) и это починило сохранение времени. * Фикс использования хука (пробел по стене когда вы в воздухе).
* Фикс сортировки таблицы лидеров. * Фикс сортировки таблицы лидеров.
* Убрал ваш SteamID в углу потому что могу. * Убрал ваш SteamID в углу потому что могу.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -20,7 +20,7 @@ function ENT:SetupDataTables()
self:NetworkVar( "Entity", 1, "Passenger2" ) self:NetworkVar( "Entity", 1, "Passenger2" )
self:NetworkVar( "Entity", 2, "Passenger3" ) self:NetworkVar( "Entity", 2, "Passenger3" )
self:NetworkVar( "Entity", 3, "Passenger4" ) self:NetworkVar( "Entity", 3, "Passenger4" )
self:NetworkVar( "Vector", 0, "DestinationPos" ) self:NetworkVar( "Vector", 0, "DestinationPos" )
self:NetworkVar( "Angle", 1, "DestinationAngle" ) self:NetworkVar( "Angle", 1, "DestinationAngle" )
end end
@ -58,14 +58,14 @@ local function draw_blur( a, d )
surface.SetDrawColor( 255, 255, 255 ) surface.SetDrawColor( 255, 255, 255 )
surface.SetMaterial( blur ) surface.SetMaterial( blur )
for i = 1, d do for i = 1, d do
blur:SetFloat( "$blur", (i / d ) * ( a ) ) blur:SetFloat( "$blur", (i / d ) * ( a ) )
blur:Recompute() blur:Recompute()
render.UpdateScreenEffectTexture() render.UpdateScreenEffectTexture()
surface.DrawTexturedRect( 0, 0, ScrW(), ScrH() ) surface.DrawTexturedRect( 0, 0, ScrW(), ScrH() )
end end
end end
local blurint = 4 local blurint = 4
local rabbitpos, rabbitang = Vector(), Angle() local rabbitpos, rabbitang = Vector(), Angle()
@ -79,7 +79,7 @@ local angoffset = Angle(0,90,90)
local lastpos = Vector() local lastpos = Vector()
local lastang = Angle() local lastang = Angle()
local endlerp = 0 local endlerp = 0
local endlerppos = Vector() local endlerppos = Vector()
local neweye = false local neweye = false
@ -95,7 +95,7 @@ local function LandingHUDPaint()
introalpha = introalpha-(FrameTime()*50) introalpha = introalpha-(FrameTime()*50)
surface.SetDrawColor(0,0,0,introalpha) surface.SetDrawColor(0,0,0,introalpha)
surface.DrawRect(0,0,ScrW(),ScrH()) surface.DrawRect(0,0,ScrW(),ScrH())
if introalpha <= 0 then if introalpha <= 0 then
hook.Remove("HUDPaint", "LandingHUDPaint") hook.Remove("HUDPaint", "LandingHUDPaint")
end end
@ -149,10 +149,10 @@ function ENT:Draw()
render.PushFilterMin( TEXFILTER.ANISOTROPIC ) render.PushFilterMin( TEXFILTER.ANISOTROPIC )
self:DrawModel() self:DrawModel()
cam.Start2D(vector_origin,angle_zero) cam.Start2D(vector_origin,angle_zero)
draw_blur(math.max(blurint*-diff,0),5) draw_blur(math.max(blurint*-diff,0),5)
-- DrawBokehDOF(5,0.99,8) -- DrawBokehDOF(5,0.99,8)
render.PopFilterMag() render.PopFilterMag()
render.PopFilterMin() render.PopFilterMin()
cam.End2D() cam.End2D()
-- end -- end
@ -179,18 +179,18 @@ local function RabbitCalcView(ply, origin, ang)
ang.x = oldangx ang.x = oldangx
angles.z = angles.z * absdiff angles.z = angles.z * absdiff
-- angles.x = angles.x * absdiff -- angles.x = angles.x * absdiff
-- angles.x = angles.x*ang:Forward():Dot(ang:Forward()) -- angles.x = angles.x*ang:Forward():Dot(ang:Forward())
-- angles.z = angles.z*math.abs(ang:Forward():Dot(ang:Forward())) -- angles.z = angles.z*math.abs(ang:Forward():Dot(ang:Forward()))
pos:Set(npos) pos:Set(npos)
origin:Set(pos) origin:Set(pos)
ang:Add(angles) ang:Add(angles)
lastpos:Set(origin) lastpos:Set(origin)
lastang:Set(ang) lastang:Set(ang)
elseif endlerp < 1 then elseif endlerp < 1 then
if !neweye then if !neweye then
lastang.z = 0 lastang.z = 0
ang:Set(lastang) ang:Set(lastang)
ply:SetEyeAngles(lastang) ply:SetEyeAngles(lastang)
neweye = true neweye = true
@ -210,7 +210,7 @@ local function RabbitVM(wep, vm, oldpos, oldang, pos, ang)
if IsValid(rabbit) and rabbit:GetCycle() < 1 and IsLanding(rabbit) then if IsValid(rabbit) and rabbit:GetCycle() < 1 and IsLanding(rabbit) then
pos:Set(lastpos) pos:Set(lastpos)
ang:Set(lastang) ang:Set(lastang)
pos:Sub(diffpos) pos:Sub(diffpos)
ang:Sub(diffang) ang:Sub(diffang)
elseif endlerp < 1 then elseif endlerp < 1 then

View file

@ -36,7 +36,7 @@ function ENT:Initialize()
else else
self:SetTrigger(true) self:SetTrigger(true)
end end
self:SetPos(self:GetPos() + Vector(-0, -0, 0)) self:SetPos(self:GetPos() + Vector(-0, -0, 0))
end end
@ -53,7 +53,7 @@ function ENT:StartTouch(ent)
ent.CPSaveVel = ent:GetVelocity() ent.CPSaveVel = ent:GetVelocity()
ent:SaveParkourState() ent:SaveParkourState()
net.Start("Checkpoint_Hit") net.Start("Checkpoint_Hit")
net.WriteUInt(ent:GetNW2Int("CPNum", 1), 8) net.WriteUInt(ent:GetNW2Int("CPNum", 1), 8)
net.Send(ent) net.Send(ent)
end end
ent:ScreenFade(SCREENFADE.IN, screencolor, 0.25, 0) ent:ScreenFade(SCREENFADE.IN, screencolor, 0.25, 0)

View file

@ -350,7 +350,7 @@ end
local tr = {} local tr = {}
local tr_result = {} 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() function SWEP:PrimaryAttack()
local ply = self.Owner local ply = self.Owner

View file

@ -191,12 +191,10 @@ local function TutorialMarker()
markerup[3] = markerup[3] + 50 + math.sin(CurTime() * 4) * 5 markerup[3] = markerup[3] + 50 + math.sin(CurTime() * 4) * 5
cam.Start3D2D(markerup - ang:Right() * 13, ang, 1) cam.Start3D2D(markerup - ang:Right() * 13, ang, 1)
surface.SetFont("BeatrunHUD")
surface.SetFont("BeatrunHUD") surface.SetTextPos(0, 0)
surface.SetTextPos(0, 0) surface.SetTextColor(markercol)
surface.SetTextColor(markercol) surface.DrawText("")
surface.DrawText("")
cam.End3D2D() cam.End3D2D()
end end
end end
@ -222,32 +220,30 @@ local function CreditsThink()
if gui.IsGameUIVisible() then return end if gui.IsGameUIVisible() then return end
cam.Start2D() cam.Start2D()
local data = creditslist[curcredit]
local data = creditslist[curcredit] surface.SetDrawColor(0, 0, 0)
surface.DrawRect(0, 0, ScrW(), ScrH())
surface.SetFont("BeatrunHUD")
surface.SetDrawColor(0, 0, 0) local text = data[2]
surface.DrawRect(0, 0, ScrW(), ScrH()) text = string.format(text, LocalPlayer():Nick())
surface.SetFont("BeatrunHUD")
local text = data[2] local tw, th = surface.GetTextSize(text)
text = string.format(text, LocalPlayer():Nick())
local tw, th = surface.GetTextSize(text) surface.SetTextColor(220, 220, 220, 255)
surface.SetTextPos(ScrW() / 2 - (tw * 0.5), ScrH() / 2 - (th * 0.5))
surface.DrawText(text)
surface.SetTextColor(220, 220, 220, 255) if CurTime() > creditstime + data[1] then
surface.SetTextPos(ScrW() / 2 - (tw * 0.5), ScrH() / 2 - (th * 0.5)) creditstime = CurTime()
surface.DrawText(text) curcredit = curcredit + 1
if CurTime() > creditstime + data[1] then if not creditslist[curcredit] then
creditstime = CurTime() hook.Remove("PreRender", "Credits")
curcredit = curcredit + 1 RunConsoleCommand("disconnect")
end
if not creditslist[curcredit] then
hook.Remove("PreRender", "Credits")
RunConsoleCommand("disconnect")
end end
end
cam.End2D() cam.End2D()
return true return true

View file

@ -113,19 +113,19 @@ function GenerateBuildModeRT(model)
dummy:SetModel(model) dummy:SetModel(model)
local sicon = PositionSpawnIcon(dummy, vector_origin) 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)
render.SetModelLighting(0, 4, 4, 4)
render.SetModelLighting(1, 2, 2, 2)
render.SetModelLighting(2, 2, 2, 2)
render.SetModelLighting(3, 4, 4, 4)
render.SetModelLighting(4, 3, 3, 3)
render.SetModelLighting(5, 4, 4, 4)
render.Clear(0, 0, 0, 0) dummy:DrawModel()
render.ClearDepth()
render.SetWriteDepthToDestAlpha(false)
render.SetModelLighting(0, 4, 4, 4)
render.SetModelLighting(1, 2, 2, 2)
render.SetModelLighting(2, 2, 2, 2)
render.SetModelLighting(3, 4, 4, 4)
render.SetModelLighting(4, 3, 3, 3)
render.SetModelLighting(5, 4, 4, 4)
dummy:DrawModel()
cam.End3D() cam.End3D()
render.PopRenderTarget() render.PopRenderTarget()

View file

@ -172,39 +172,38 @@ function DrawDeletionText()
local _, th = surface.GetTextSize(deletionstringc) local _, th = surface.GetTextSize(deletionstringc)
cam.Start2D() cam.Start2D()
local num = 0
local ply = LocalPlayer()
local vp = ply:GetViewPunchAngles()
local vpcl = ply.ViewPunchAngle or angle_zero
local num = 0 vp:Add(vpcl)
local ply = LocalPlayer()
local vp = ply:GetViewPunchAngles()
local vpcl = ply.ViewPunchAngle or angle_zero
vp:Add(vpcl) local GlitchIntensity = incredits and 2 or GlitchIntensity
surface.SetTextColor(255, 255, 255, 2.5 * (num + 1) * GlitchIntensity)
local GlitchIntensity = incredits and 2 or GlitchIntensity for k, v in ipairs(deletiontable) do
surface.SetTextColor(255, 255, 255, 2.5 * (num + 1) * GlitchIntensity) surface.SetTextColor(255, 255, 255, 2.5 * k * GlitchIntensity)
local text = v
for k, v in ipairs(deletiontable) do for i = 1, 4 do
surface.SetTextColor(255, 255, 255, 2.5 * k * GlitchIntensity) local index = math.random(1, #text)
local text = v
for i = 1, 4 do if text[index] ~= " " then
local index = math.random(1, #text) text = text:SetChar(index, garble[math.random(1, garblelen)])
end
if text[index] ~= " " then
text = text:SetChar(index, garble[math.random(1, garblelen)])
end end
surface.SetTextPos(ScrW() * 0.01 + vp.x, ScrH() * 0.05 + (k - 1) * th + vp.y)
surface.DrawText(text)
num = k
end end
surface.SetTextPos(ScrW() * 0.01 + vp.x, ScrH() * 0.05 + (k - 1) * th + vp.y) if deletiontype > 0 then
surface.DrawText(text) surface.SetTextPos(ScrW() * 0.01 + vp.x, ScrH() * 0.05 + num * th + vp.y)
num = k surface.DrawText(deletionstringc)
end end
if deletiontype > 0 then
surface.SetTextPos(ScrW() * 0.01 + vp.x, ScrH() * 0.05 + num * th + vp.y)
surface.DrawText(deletionstringc)
end
cam.End2D() cam.End2D()
GlitchIntensity = oldgi GlitchIntensity = oldgi
end end

View file

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

View file

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

View file

@ -7,6 +7,10 @@ local packetloss = Material("vgui/packetloss.png")
local lastloss = 0 local lastloss = 0
local MELogo = Material("vgui/MELogo.png", "mips smooth") 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 = { local hide = {
CHudBattery = true, CHudBattery = true,
CHudHealth = true, CHudHealth = true,
@ -106,9 +110,12 @@ local function DrawBlurRect(x, y, w, h, a)
for i = 1, 2 do for i = 1, 2 do
blur:SetFloat("$blur", i / 3 * 5) blur:SetFloat("$blur", i / 3 * 5)
blur:Recompute() blur:Recompute()
render.UpdateScreenEffectTexture() render.UpdateScreenEffectTexture()
render.SetScissorRect(x, y, x + w, y + h, true) render.SetScissorRect(x, y, x + w, y + h, true)
surface.DrawTexturedRect(X * -1, Y * -1, ScrW(), ScrH()) surface.DrawTexturedRect(X * -1, Y * -1, ScrW(), ScrH())
render.SetScissorRect(0, 0, 0, 0, false) render.SetScissorRect(0, 0, 0, 0, false)
end end
end end
@ -174,8 +181,11 @@ local function BeatrunHUD()
end end
surface.SetFont("BeatrunHUDSmall") surface.SetFont("BeatrunHUDSmall")
local nickw, nickh = surface.GetTextSize(nicktext) local nickw, nickh = surface.GetTextSize(nicktext)
surface.SetFont("BeatrunHUD") surface.SetFont("BeatrunHUD")
local coursew, _ = surface.GetTextSize(coursename) local coursew, _ = surface.GetTextSize(coursename)
local bgpadw = nickw local bgpadw = nickw
-- local bgpadh = nickh -- local bgpadh = nickh
@ -193,15 +203,25 @@ local function BeatrunHUD()
hidealpha = 0 hidealpha = 0
end 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)) 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)) 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.DrawOutlinedRect(20 + vp.z, scrh * 0.895 + vp.x, SScaleX(bgpadding), SScaleY(85))
surface.SetFont("BeatrunHUD") 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.SetTextPos(scrw * 0.015 + vp.z, scrh * 0.9 + vp.x)
surface.DrawText("Lv." .. ply:GetLevel()) surface.DrawText("Lv." .. ply:GetLevel())
@ -219,12 +239,15 @@ local function BeatrunHUD()
surface.DrawText(nicktext) surface.DrawText(nicktext)
surface.SetDrawColor(25, 25, 25, math.max(255 - hidealpha, 2)) 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.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)) 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 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.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.SetTextPos(scrw * 0.015 + vp.z + nickw + 3, scrh * 0.92 + vp.x + nickh - 42 + 50 * math.abs(CurTime() - k) / 5)
surface.DrawText(v) surface.DrawText(v)
@ -234,8 +257,12 @@ local function BeatrunHUD()
end end
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.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.SetTextPos(scrw * 0.015 + vp.z, scrh * 0.95 + vp.x)
surface.DrawText(coursename) surface.DrawText(coursename)
end end

View file

@ -1208,12 +1208,11 @@ local function JumpArmDraw(a, b, c)
if IsValid(activewep) and activewep:GetClass() == "runnerhands" then if IsValid(activewep) and activewep:GetClass() == "runnerhands" then
if not worldarm[BodyAnimString] then if not worldarm[BodyAnimString] then
cam.Start3D(pos, ang) cam.Start3D(pos, ang)
cam.IgnoreZ(ignorezarm[BodyAnimString] or false) cam.IgnoreZ(ignorezarm[BodyAnimString] or false)
BodyAnimMDLarm:SetPos(pos)
bac:SetupBones()
BodyAnimMDLarm:DrawModel()
BodyAnimMDLarm:SetPos(pos)
bac:SetupBones()
BodyAnimMDLarm:DrawModel()
cam.End3D() cam.End3D()
else else
local armoff = LocalToWorld(armoffset, angle_zero, vector_origin, BodyAnim:GetAngles()) local armoff = LocalToWorld(armoffset, angle_zero, vector_origin, BodyAnim:GetAngles())

View file

@ -20,7 +20,7 @@ local function HideNearby(ply)
LocalPlayer().InfectionTouchDelay = CurTime() + 1 LocalPlayer().InfectionTouchDelay = CurTime() + 1
net.Start("Infection_Touch") net.Start("Infection_Touch")
net.WriteEntity(ply) net.WriteEntity(ply)
net.SendToServer() net.SendToServer()
end end
@ -56,9 +56,9 @@ local function HideNearby(ply)
ang:RotateAroundAxis(ang:Right(), 90) ang:RotateAroundAxis(ang:Right(), 90)
cam.Start3D2D(pos, Angle(0, ang.y, 90), math.max(2.5 * Distance / 2000, 0.5)) cam.Start3D2D(pos, Angle(0, ang.y, 90), math.max(2.5 * Distance / 2000, 0.5))
cam.IgnoreZ(true) cam.IgnoreZ(true)
draw.DrawText(ply:Nick(), "BeatrunHUD", 2, 2, color, TEXT_ALIGN_CENTER) draw.DrawText(ply:Nick(), "BeatrunHUD", 2, 2, color, TEXT_ALIGN_CENTER)
cam.IgnoreZ(false) cam.IgnoreZ(false)
cam.End3D2D() cam.End3D2D()
return dontdraw return dontdraw

View file

@ -14,14 +14,14 @@ hook.Add("PostRender", "Watermark", function()
end end
cam.Start2D() cam.Start2D()
surface.SetTextPos(wmx, wmy) surface.SetTextPos(wmx, wmy)
surface.DrawText("Beta") surface.DrawText("Beta")
surface.SetTextPos(wmx, wmy + th) surface.SetTextPos(wmx, wmy + th)
surface.DrawText(steamid) surface.DrawText(steamid)
surface.SetTextPos(wmx, wmy + (th * 2)) surface.SetTextPos(wmx, wmy + (th * 2))
surface.DrawText(system.SteamTime()) surface.DrawText(system.SteamTime())
surface.SetTextPos(wmx, wmy + (th * 3)) surface.SetTextPos(wmx, wmy + (th * 3))
surface.DrawText(LocalPlayer():Nick()) surface.DrawText(LocalPlayer():Nick())
cam.End2D() cam.End2D()
end) end)
]] ]]

View file

@ -44,7 +44,7 @@ local function World_Whitescale()
whitescale = true whitescale = true
net.Start("ToggleWhitescale") net.Start("ToggleWhitescale")
net.WriteBool(whitescale) net.WriteBool(whitescale)
net.SendToServer() net.SendToServer()
end end

View file

@ -557,7 +557,7 @@ local function Blindness(origin, angles)
if AEUIDraw then if AEUIDraw then
cam.Start2D() cam.Start2D()
AEUIDraw() AEUIDraw()
cam.End2D() cam.End2D()
end end
@ -569,8 +569,10 @@ blinded = false
local function BlindnessPreUI() local function BlindnessPreUI()
if blinded then if blinded then
cam.Start3D() cam.Start3D()
render.Clear(10, 10, 10, 0) render.Clear(10, 10, 10, 0)
cam.End3D() cam.End3D()
draw.NoTexture() draw.NoTexture()
end end
end end

View file

@ -235,8 +235,8 @@ function PLAYER:Spawn()
ply.Course_StartTime = CurTime() + (2 * faststartmult) ply.Course_StartTime = CurTime() + (2 * faststartmult)
net.Start("BeatrunSpawn") net.Start("BeatrunSpawn")
net.WriteFloat(CurTime()) net.WriteFloat(CurTime())
net.WriteBool(ply.InReplay) net.WriteBool(ply.InReplay)
net.Send(ply) net.Send(ply)
ply.SpawnFreezeTime = CurTime() + (1.75 * faststartmult) ply.SpawnFreezeTime = CurTime() + (1.75 * faststartmult)

View file

@ -138,7 +138,7 @@ if CLIENT then
end end
net.Start("Checkpoint_Finish") net.Start("Checkpoint_Finish")
net.WriteFloat(totaltime) net.WriteFloat(totaltime)
net.SendToServer() net.SendToServer()
timealpha = 1000 timealpha = 1000
@ -227,10 +227,6 @@ function CourseHUD()
local vpx = vp.x local vpx = vp.x
local vpz = vp.z local vpz = vp.z
local incourse = Course_Name ~= "" 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 local totaltime = CheckpointNumber ~= -1 and math.max(0, CurTime() - Course_StartTime) or Course_EndTime
if incourse then if incourse then
@ -249,6 +245,10 @@ function CourseHUD()
text = speed .. " km/h" text = speed .. " km/h"
w, _ = surface.GetTextSize(text) 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.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.85 + vpz)
surface.DrawText(text) surface.DrawText(text)
end end

View file

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

View file

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

View file

@ -162,7 +162,7 @@ hook.Add("OnPlayerHitGround", "MELandSound", function(ply, water, floater, speed
Hardland(false) Hardland(false)
elseif SERVER and game.SinglePlayer() then elseif SERVER and game.SinglePlayer() then
net.Start("Beatrun_HardLand") net.Start("Beatrun_HardLand")
net.WriteBool(false) net.WriteBool(false)
net.Send(ply) net.Send(ply)
end end
end end

View file

@ -7,7 +7,7 @@ local function Disarm_Init(ply, victim)
victim:DropWeapon() victim:DropWeapon()
net.Start("DisarmStart") net.Start("DisarmStart")
net.WriteEntity(victim) net.WriteEntity(victim)
net.Send(ply) net.Send(ply)
timer.Simple(1.35, function() timer.Simple(1.35, function()

View file

@ -13,7 +13,7 @@ concommand.Add("toggleblindness", function(ply)
blinded = not blinded blinded = not blinded
net.Start("BlindPlayers") net.Start("BlindPlayers")
net.WriteBool(blinded) net.WriteBool(blinded)
net.Broadcast() net.Broadcast()
if blinded then if blinded then