From 911bbb6beaa7a70efad01ae53592c883298158d2 Mon Sep 17 00:00:00 2001 From: relaxtakenotes <91839650+relaxtakenotes@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:08:44 +0500 Subject: [PATCH] keystrokes movage + grapple prettyness --- .../localization/en/beatrun.properties | 4 + .../localization/it/beatrun.properties | 8 +- .../localization/pl/beatrun.properties | 4 + .../localization/pt-BR/beatrun.properties | 8 +- .../localization/ru/beatrun.properties | 4 + .../localization/tr/beatrun.properties | 8 +- .../localization/uk/beatrun.properties | 8 +- .../beatrun/gamemode/cl/Keystrokes.lua | 147 +++++++++++------- .../beatrun/gamemode/cl/ToolMenuSettings.lua | 4 + .../gamemodes/beatrun/gamemode/sh/Grapple.lua | 7 +- beatrun/gamemodes/beatrun/gamemode/shared.lua | 2 +- version.txt | 2 +- 12 files changed, 135 insertions(+), 71 deletions(-) diff --git a/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties b/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties index ea2b1eb..4364a28 100644 --- a/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties +++ b/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties @@ -121,6 +121,10 @@ beatrun.toolsmenu.hud.showSpeedometerDesc=Shows the speedometer on HUD (hiding H beatrun.toolsmenu.hud.keystrokes=Show Keystrokes beatrun.toolsmenu.hud.keystrokesdesc=Shows keys that you press +beatrun.toolsmenu.hud.keystrokes_x_offset=Keystrokes X Offset +beatrun.toolsmenu.hud.keystrokes_y_offset=Keystrokes Y Offset +beatrun.toolsmenu.hud.keystrokes_corner=Keystrokes Alignment + beatrun.toolsmenu.hud.hidden=Hide HUD beatrun.toolsmenu.hud.hiddendesc=0 - Shown\n1 - Gamemode and speedometer only\n2 - Hidden diff --git a/beatrun/gamemodes/beatrun/content/resource/localization/it/beatrun.properties b/beatrun/gamemodes/beatrun/content/resource/localization/it/beatrun.properties index 4e748d1..320b654 100644 --- a/beatrun/gamemodes/beatrun/content/resource/localization/it/beatrun.properties +++ b/beatrun/gamemodes/beatrun/content/resource/localization/it/beatrun.properties @@ -105,8 +105,12 @@ beatrun.toolsmenu.hud.nametagsdesc=Attiva/disattiva i nametag sopra i giocatori beatrun.toolsmenu.hud.hudxp=Mostra XP HUD beatrun.toolsmenu.hud.hudxpdesc=Mostra XP totali vicino al tuo nickname -beatrun.toolsmenu.hud.keystrokes=Show Keystrokes -beatrun.toolsmenu.hud.keystrokesdesc=Shows keys that you press +beatrun.toolsmenu.hud.keystrokes=Spettacolo Keystrokes +beatrun.toolsmenu.hud.keystrokesdesc=Mostra i tasti che premi + +beatrun.toolsmenu.hud.keystrokes_x_offset=Keystrokes X Offset +beatrun.toolsmenu.hud.keystrokes_y_offset=Keystrokes Y Offset +beatrun.toolsmenu.hud.keystrokes_corner=Keystrokes Allineamento beatrun.toolsmenu.hud.hidden=Nascondi HUD beatrun.toolsmenu.hud.hiddendesc=0 - Mostra\n1 - Solo Modalità di gioco\n2 - Nascosta diff --git a/beatrun/gamemodes/beatrun/content/resource/localization/pl/beatrun.properties b/beatrun/gamemodes/beatrun/content/resource/localization/pl/beatrun.properties index 42c12b6..1bba6a4 100644 --- a/beatrun/gamemodes/beatrun/content/resource/localization/pl/beatrun.properties +++ b/beatrun/gamemodes/beatrun/content/resource/localization/pl/beatrun.properties @@ -121,6 +121,10 @@ beatrun.toolsmenu.hud.showSpeedometerDesc=Pokazuje prędkościomierz na interfej beatrun.toolsmenu.hud.keystrokes=Pokaż naciśnięte klawisze beatrun.toolsmenu.hud.keystrokesdesc=Pokazuje na interfejsie klawisze, które wciskasz podczas gry +beatrun.toolsmenu.hud.keystrokes_x_offset=Keystrokes X Zrównoważyć +beatrun.toolsmenu.hud.keystrokes_y_offset=Keystrokes Y Zrównoważyć +beatrun.toolsmenu.hud.keystrokes_corner=Keystrokes Wyrównanie + beatrun.toolsmenu.hud.hidden=Ukryj interfejs beatrun.toolsmenu.hud.hiddendesc=0 - Pokazany\n1 - Tylko poza rozgrywką swobodną\n2 - Ukryty diff --git a/beatrun/gamemodes/beatrun/content/resource/localization/pt-BR/beatrun.properties b/beatrun/gamemodes/beatrun/content/resource/localization/pt-BR/beatrun.properties index d2785a2..0953544 100644 --- a/beatrun/gamemodes/beatrun/content/resource/localization/pt-BR/beatrun.properties +++ b/beatrun/gamemodes/beatrun/content/resource/localization/pt-BR/beatrun.properties @@ -106,8 +106,12 @@ beatrun.toolsmenu.hud.nametagsdesc=Mostrar crachás acima dos nomes de jogadores beatrun.toolsmenu.hud.hudxp=Mostrar XP beatrun.toolsmenu.hud.hudxpdesc=Mostrar XP total perto do seu nome -beatrun.toolsmenu.hud.keystrokes=Show Keystrokes -beatrun.toolsmenu.hud.keystrokesdesc=Shows keys that you press +beatrun.toolsmenu.hud.keystrokes=Mostrar Keystrokes +beatrun.toolsmenu.hud.keystrokesdesc=Mostra as teclas que você pressiona + +beatrun.toolsmenu.hud.keystrokes_x_offset=Keystrokes X Desvio +beatrun.toolsmenu.hud.keystrokes_y_offset=Keystrokes Y Desvio +beatrun.toolsmenu.hud.keystrokes_corner=Keystrokes Alinhamento beatrun.toolsmenu.hud.hidden=Esconder a HUD beatrun.toolsmenu.hud.hiddendesc=0 - Mostrado\n1 - Gamemode apenas\n2 - Escondido diff --git a/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties b/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties index 7f5ce00..74f926c 100644 --- a/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties +++ b/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties @@ -118,6 +118,10 @@ beatrun.toolsmenu.hud.speedometermodedesc=0 - км/ч, 1 - миль/ч, 2 - хе beatrun.toolsmenu.hud.keystrokes=Показывать клавиши beatrun.toolsmenu.hud.keystrokesdesc=Показывает нажатие клавиш в HUD +beatrun.toolsmenu.hud.keystrokes_x_offset=Keystrokes X Сдвиг +beatrun.toolsmenu.hud.keystrokes_y_offset=Keystrokes Y Сдвиг +beatrun.toolsmenu.hud.keystrokes_corner=Keystrokes Выравнивание + beatrun.toolsmenu.hud.hidden=Скрыть HUD beatrun.toolsmenu.hud.hiddendesc=0 - Показать\n1 - Только режим и спидометр\n2 - Скрыть полностью diff --git a/beatrun/gamemodes/beatrun/content/resource/localization/tr/beatrun.properties b/beatrun/gamemodes/beatrun/content/resource/localization/tr/beatrun.properties index 5dcf3e7..501d6ce 100644 --- a/beatrun/gamemodes/beatrun/content/resource/localization/tr/beatrun.properties +++ b/beatrun/gamemodes/beatrun/content/resource/localization/tr/beatrun.properties @@ -106,8 +106,12 @@ beatrun.toolsmenu.hud.nametagsdesc=Oyuncuların üzerindeki ad etiketlerini aça beatrun.toolsmenu.hud.hudxp=Arayüz XP'yi göster beatrun.toolsmenu.hud.hudxpdesc=Takma adın yanında toplam XP'yi göster -beatrun.toolsmenu.hud.keystrokes=Show Keystrokes -beatrun.toolsmenu.hud.keystrokesdesc=Shows keys that you press +beatrun.toolsmenu.hud.keystrokes=Göstermek Keystrokes +beatrun.toolsmenu.hud.keystrokesdesc=Bastığınız tuşları gösterir + +beatrun.toolsmenu.hud.keystrokes_x_offset=Keystrokes X Telafi etmek +beatrun.toolsmenu.hud.keystrokes_y_offset=Keystrokes Y Telafi etmek +beatrun.toolsmenu.hud.keystrokes_corner=Keystrokes Hizalama beatrun.toolsmenu.hud.hidden=Arayüzü gizle beatrun.toolsmenu.hud.hiddendesc=0 - Gösterilen\n1 - Yalnızca oyun\nmodu 2 - Gizli diff --git a/beatrun/gamemodes/beatrun/content/resource/localization/uk/beatrun.properties b/beatrun/gamemodes/beatrun/content/resource/localization/uk/beatrun.properties index a75bd0a..13abfea 100644 --- a/beatrun/gamemodes/beatrun/content/resource/localization/uk/beatrun.properties +++ b/beatrun/gamemodes/beatrun/content/resource/localization/uk/beatrun.properties @@ -110,8 +110,12 @@ beatrun.toolsmenu.hud.hudxpdesc=Показує весь XP в HUD beatrun.toolsmenu.hud.showSpeedometer=Показувати швидкість (спідометр) beatrun.toolsmenu.hud.showSpeedometerDesc=Показує спідометр на HUD (приховування HUD не впливає на видимість) -beatrun.toolsmenu.hud.keystrokes=Show Keystrokes -beatrun.toolsmenu.hud.keystrokesdesc=Shows keys that you press +beatrun.toolsmenu.hud.keystrokes=Показати Keystrokes +beatrun.toolsmenu.hud.keystrokesdesc=Показує клавіші, які ви натискаєте + +beatrun.toolsmenu.hud.keystrokes_x_offset=Keystrokes X Зсув +beatrun.toolsmenu.hud.keystrokes_y_offset=Keystrokes Y Зсув +beatrun.toolsmenu.hud.keystrokes_corner=Keystrokes Вирівнювання beatrun.toolsmenu.hud.hidden=Приховати HUD beatrun.toolsmenu.hud.hiddendesc=0 - Показати\n1 - Тільки режим\n2 - Приховати повністю diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/Keystrokes.lua b/beatrun/gamemodes/beatrun/gamemode/cl/Keystrokes.lua index a3c0053..fa40fa9 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/Keystrokes.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/Keystrokes.lua @@ -20,8 +20,17 @@ local function GetFormattedKey(bind) end end +local Beatrun_HUDHidden = GetConVar("Beatrun_HUDHidden") + +local xoff = 0 +local yoff = 0 + +local Beatrun_KeystrokesXOffset = CreateClientConVar("Beatrun_KeystrokesXOffset", 0, true, true) +local Beatrun_KeystrokesYOffset = CreateClientConVar("Beatrun_KeystrokesYOffset", 0, true, true) +local Beatrun_KeystrokesCorner = CreateClientConVar("Beatrun_KeystrokesCorner", 0, true, true) + local function ShowKeyStrokes() - if showKeystrokes:GetBool() and GetConVar("Beatrun_HUDHidden"):GetInt() == 0 then + if showKeystrokes:GetBool() and Beatrun_HUDHidden:GetInt() == 0 then local forward = GetFormattedKey("+forward") local back = GetFormattedKey("+back") local moveleft = GetFormattedKey("+moveleft") @@ -34,114 +43,134 @@ local function ShowKeyStrokes() local attack = GetFormattedKey("+attack") local attack2 = GetFormattedKey("+attack2") - if LocalPlayer():KeyDown(IN_FORWARD) then - surface.SetDrawColor(color_white_t) - surface.DrawRect(size, 0, size, size) - draw.SimpleText(forward, "BeatrunHUD", size + 10, size - 30, color_black) - else - surface.SetDrawColor(color_black_t) - surface.DrawRect(size, 0, size, size) - draw.SimpleText(forward, "BeatrunHUD", size + 10, size - 30, color_white) + local h = ScrH() + local w = ScrW() + + local lp = LocalPlayer() + + if Beatrun_KeystrokesCorner:GetInt() == 0 then + xoff = Beatrun_KeystrokesXOffset:GetFloat() + yoff = Beatrun_KeystrokesYOffset:GetFloat() + elseif Beatrun_KeystrokesCorner:GetInt() == 1 then + xoff = w - Beatrun_KeystrokesXOffset:GetFloat() - size * 5 + yoff = Beatrun_KeystrokesYOffset:GetFloat() + elseif Beatrun_KeystrokesCorner:GetInt() == 2 then + xoff = Beatrun_KeystrokesXOffset:GetFloat() + yoff = h - Beatrun_KeystrokesYOffset:GetFloat() - size * 5 + elseif Beatrun_KeystrokesCorner:GetInt() == 3 then + xoff = w - Beatrun_KeystrokesXOffset:GetFloat() - size * 5 + yoff = h - Beatrun_KeystrokesYOffset:GetFloat() - size * 5 end - if LocalPlayer():KeyDown(IN_USE) then + + if lp:KeyDown(IN_FORWARD) then surface.SetDrawColor(color_white_t) - surface.DrawRect(size * 2, 0, size, size) - draw.SimpleText(use, "BeatrunHUD", size + 48, size - 30, color_black) + surface.DrawRect(xoff + size, yoff + 0, size, size) + draw.SimpleText(forward, "BeatrunHUD", xoff + size + 10, yoff + size - 30, color_black) else surface.SetDrawColor(color_black_t) - surface.DrawRect(size * 2, 0, size, size) - draw.SimpleText(use, "BeatrunHUD", size + 48, size - 30, color_white) + surface.DrawRect(xoff + size, yoff + 0, size, size) + draw.SimpleText(forward, "BeatrunHUD", xoff + size + 10, yoff + size - 30, color_white) end - if LocalPlayer():KeyDown(IN_RELOAD) then + if lp:KeyDown(IN_USE) then surface.SetDrawColor(color_white_t) - surface.DrawRect(size * 3, 0, size, size) - draw.SimpleText(reload, "BeatrunHUD", size * 3 + 12, size - 30, color_black) + surface.DrawRect(xoff + size * 2, yoff + 0, size, size) + draw.SimpleText(use, "BeatrunHUD", xoff + size + 48, yoff + size - 30, color_black) else surface.SetDrawColor(color_black_t) - surface.DrawRect(size * 3, 0, size, size) - draw.SimpleText(reload, "BeatrunHUD", size * 3 + 12, size - 30, color_white) + surface.DrawRect(xoff + size * 2, yoff + 0, size, size) + draw.SimpleText(use, "BeatrunHUD", xoff + size + 48, yoff + size - 30, color_white) end - if LocalPlayer():KeyDown(IN_MOVELEFT) then + if lp:KeyDown(IN_RELOAD) then surface.SetDrawColor(color_white_t) - surface.DrawRect(0, size, size, size) - draw.SimpleText(moveleft, "BeatrunHUD", size - 23, size + 8, color_black) + surface.DrawRect(xoff + size * 3, yoff + 0, size, size) + draw.SimpleText(reload, "BeatrunHUD", xoff + size * 3 + 12, yoff + size - 30, color_black) else surface.SetDrawColor(color_black_t) - surface.DrawRect(0, size, size, size) - draw.SimpleText(moveleft, "BeatrunHUD", size - 23, size + 8, color_white) + surface.DrawRect(xoff + size * 3, yoff + 0, size, size) + draw.SimpleText(reload, "BeatrunHUD", xoff + size * 3 + 12, yoff + size - 30, color_white) end - if LocalPlayer():KeyDown(IN_BACK) then + if lp:KeyDown(IN_MOVELEFT) then surface.SetDrawColor(color_white_t) - surface.DrawRect(size, size, size, size) - draw.SimpleText(back, "BeatrunHUD", size + 12, size + 8, color_black) + surface.DrawRect(xoff + 0, yoff + size, size, size) + draw.SimpleText(moveleft, "BeatrunHUD", xoff + size - 23, yoff + size + 8, color_black) else surface.SetDrawColor(color_black_t) - surface.DrawRect(size, size, size, size) - draw.SimpleText(back, "BeatrunHUD", size + 12, size + 8, color_white) + surface.DrawRect(xoff + 0, yoff + size, size, size) + draw.SimpleText(moveleft, "BeatrunHUD", xoff + size - 23, yoff + size + 8, color_white) end - if LocalPlayer():KeyDown(IN_MOVERIGHT) then + if lp:KeyDown(IN_BACK) then surface.SetDrawColor(color_white_t) - surface.DrawRect(size * 2, size, size, size) - draw.SimpleText(moveright, "BeatrunHUD", size + 48, size + 8, color_black) + surface.DrawRect(xoff + size, yoff + size, size, size) + draw.SimpleText(back, "BeatrunHUD", xoff + size + 12, yoff + size + 8, color_black) else surface.SetDrawColor(color_black_t) - surface.DrawRect(size * 2, size, size, size) - draw.SimpleText(moveright, "BeatrunHUD", size + 48, size + 8, color_white) + surface.DrawRect(xoff + size, yoff + size, size, size) + draw.SimpleText(back, "BeatrunHUD", xoff + size + 12, yoff + size + 8, color_white) end - if LocalPlayer():KeyDown(IN_JUMP) then + if lp:KeyDown(IN_MOVERIGHT) then surface.SetDrawColor(color_white_t) - surface.DrawRect(0, size * 2, size * 3, size) - draw.SimpleText(jump, "BeatrunHUD", 28, size * 2 + 8, color_black) + surface.DrawRect(xoff + size * 2, yoff + size, size, size) + draw.SimpleText(moveright, "BeatrunHUD", xoff + size + 48, yoff + size + 8, color_black) else surface.SetDrawColor(color_black_t) - surface.DrawRect(0, size * 2, size * 3, size) - draw.SimpleText(jump, "BeatrunHUD", 28, size * 2 + 8, color_white) + surface.DrawRect(xoff + size * 2, yoff + size, size, size) + draw.SimpleText(moveright, "BeatrunHUD", xoff + size + 48, yoff + size + 8, color_white) end - if LocalPlayer():KeyDown(IN_SPEED) then + if lp:KeyDown(IN_JUMP) then surface.SetDrawColor(color_white_t) - surface.DrawRect(0, size * 3, size * 3, size) - draw.SimpleText(speed, "BeatrunHUD", 28, size * 3 + 8, color_black) + surface.DrawRect(xoff + 0 , yoff + size * 2, size * 3, size) + draw.SimpleText(jump, "BeatrunHUD", xoff + 25, yoff + size * 2 + 8, color_black) else surface.SetDrawColor(color_black_t) - surface.DrawRect(0, size * 3, size * 3, size) - draw.SimpleText(speed, "BeatrunHUD", 28, size * 3 + 8, color_white) + surface.DrawRect(xoff + 0, yoff + size * 2, size * 3, size) + draw.SimpleText(jump, "BeatrunHUD", xoff + 25, yoff + size * 2 + 8, color_white) end - if LocalPlayer():KeyDown(IN_DUCK) then + if lp:KeyDown(IN_SPEED) then surface.SetDrawColor(color_white_t) - surface.DrawRect(0, size * 4, size * 3, size) - draw.SimpleText(duck, "BeatrunHUD", 32, size * 4 + 8, color_black) + surface.DrawRect(xoff + 0, yoff + size * 3, size * 3, size) + draw.SimpleText(speed, "BeatrunHUD", xoff + 25, yoff + size * 3 + 8, color_black) else surface.SetDrawColor(color_black_t) - surface.DrawRect(0, size * 4, size * 3, size) - draw.SimpleText(duck, "BeatrunHUD", 32, size * 4 + 8, color_white) + surface.DrawRect(xoff + 0, yoff + size * 3, size * 3, size) + draw.SimpleText(speed, "BeatrunHUD", xoff + 25, yoff + size * 3 + 8, color_white) end - if LocalPlayer():KeyDown(IN_ATTACK) then + if lp:KeyDown(IN_DUCK) then surface.SetDrawColor(color_white_t) - surface.DrawRect(size * 3, size, size * 2, size) - draw.SimpleText(attack, "BeatrunHUD", size + 87, size + 8, color_black) + surface.DrawRect(xoff + 0, yoff + size * 4, size * 3, size) + draw.SimpleText(duck, "BeatrunHUD", xoff + 32, yoff + size * 4 + 8, color_black) else surface.SetDrawColor(color_black_t) - surface.DrawRect(size * 3, size, size * 2, size) - draw.SimpleText(attack, "BeatrunHUD", size + 87, size + 8, color_white) + surface.DrawRect(xoff + 0, yoff + size * 4, size * 3, size) + draw.SimpleText(duck, "BeatrunHUD", xoff + 32, yoff + size * 4 + 8, color_white) end - if LocalPlayer():KeyDown(IN_ATTACK2) then + if lp:KeyDown(IN_ATTACK) then surface.SetDrawColor(color_white_t) - surface.DrawRect(size * 3, size * 2, size * 2, size) - draw.SimpleText(attack2, "BeatrunHUD", size + 86, size * 2 + 8, color_black) + surface.DrawRect(xoff + size * 3, yoff + size, size * 2, size) + draw.SimpleText(attack, "BeatrunHUD", xoff + size + 87, yoff + size + 8, color_black) else surface.SetDrawColor(color_black_t) - surface.DrawRect(size * 3, size * 2, size * 2, size) - draw.SimpleText(attack2, "BeatrunHUD", size + 86, size * 2 + 8, color_white) + surface.DrawRect(xoff + size * 3, yoff + size, size * 2, size) + draw.SimpleText(attack, "BeatrunHUD", xoff + size + 87, yoff + size + 8, color_white) + end + + if lp:KeyDown(IN_ATTACK2) then + surface.SetDrawColor(color_white_t) + surface.DrawRect(xoff + size * 3, yoff + size * 2, size * 2, size) + draw.SimpleText(attack2, "BeatrunHUD", xoff + size + 86, yoff + size * 2 + 8, color_black) + else + surface.SetDrawColor(color_black_t) + surface.DrawRect(xoff + size * 3, yoff + size * 2, size * 2, size) + draw.SimpleText(attack2, "BeatrunHUD", xoff + size + 86, yoff + size * 2 + 8, color_white) end end end diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua index edd9669..d3726c7 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua @@ -170,6 +170,10 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function() panel:CheckBox("#beatrun.toolsmenu.hud.keystrokes", "Beatrun_ShowKeystrokes") panel:ControlHelp("#beatrun.toolsmenu.hud.keystrokesdesc") + panel:NumSlider("#beatrun.toolsmenu.hud.keystrokes_x_offset", "Beatrun_KeystrokesXOffset", 0, ScrW(), 0) + panel:NumSlider("#beatrun.toolsmenu.hud.keystrokes_y_offset", "Beatrun_KeystrokesYOffset", 0, ScrH(), 0) + panel:NumSlider("#beatrun.toolsmenu.hud.keystrokes_corner", "Beatrun_KeystrokesCorner", 0, 3, 0) + panel:NumSlider("#beatrun.toolsmenu.hud.speedometermode", "Beatrun_SpeedometerMode", 0, 2, 0) panel:ControlHelp("#beatrun.toolsmenu.hud.speedometermodedesc") diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua index 5c10b35..646d91f 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua @@ -5,6 +5,7 @@ if CLIENT then local brcross = Material("brcross.png", "nocull smooth") local rotate_timer = 0 + local scale = 1 hook.Add("HUDPaint", "grappleicon", function() local ply = LocalPlayer() @@ -30,7 +31,7 @@ if CLIENT then surface.SetDrawColor(255, 255, 255) surface.SetMaterial(brcross) - surface.DrawTexturedRectRotated(w2s.x, w2s.y, SScaleX(32), SScaleY(32), math.fmod(rotate_timer * 100, 360)) + surface.DrawTexturedRectRotated(w2s.x, w2s.y, SScaleX(32 * scale), SScaleY(32 * scale), math.fmod(rotate_timer * 100, 360)) return end @@ -40,16 +41,18 @@ if CLIENT then local trout = ply:GetEyeTrace() local dist = trout.HitPos:DistToSqr(ply:GetPos()) + if not trout.HitSky and trout.Fraction > 0 and dist < 2750000 and dist > 90000 then cam.Start3D() local w2s = trout.HitPos:ToScreen() cam.End3D() + scale = math.Remap(dist, 90000, 2750000, 1.3, 0.7) rotate_timer = rotate_timer + FrameTime() surface.SetDrawColor(255, 255, 255) surface.SetMaterial(brcross) - surface.DrawTexturedRectRotated(w2s.x, w2s.y, SScaleX(32), SScaleY(32), math.fmod(rotate_timer * 100, 360)) + surface.DrawTexturedRectRotated(w2s.x, w2s.y, SScaleX(32 * scale), SScaleY(32 * scale), math.fmod(rotate_timer * 100, 360)) end end) end diff --git a/beatrun/gamemodes/beatrun/gamemode/shared.lua b/beatrun/gamemodes/beatrun/gamemode/shared.lua index 0e2ff16..ef89693 100644 --- a/beatrun/gamemodes/beatrun/gamemode/shared.lua +++ b/beatrun/gamemodes/beatrun/gamemode/shared.lua @@ -1,4 +1,4 @@ -VERSION_GLOBAL = "1.0.24" +VERSION_GLOBAL = "1.0.25" VERSION_LATEST = "" VERSION_CHECKED = false diff --git a/version.txt b/version.txt index 321816a..855f702 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.24 \ No newline at end of file +1.0.25 \ No newline at end of file