From dde82ac56bbd910f451e9d007c6a89f1870b9e70 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Mon, 5 Jun 2023 15:05:26 +0500 Subject: [PATCH] fixed purist for real --- beatrun/gamemodes/beatrun/gamemode/cl/HUD.lua | 2 +- beatrun/gamemodes/beatrun/gamemode/sh/PuristMode.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/HUD.lua b/beatrun/gamemodes/beatrun/gamemode/cl/HUD.lua index 6ba6f42..8f06d65 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/HUD.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/HUD.lua @@ -225,7 +225,7 @@ local function BeatrunHUD() surface.SetTextPos(scrw * 0.015 + vp.z, scrh * 0.9 + vp.x) surface.DrawText("Lv." .. ply:GetLevel()) - if PuristMode:GetBool() then + if tobool(LocalPlayer():GetInfo("Beatrun_PuristMode")) then surface.SetDrawColor(230, 230, 230) surface.SetMaterial(MELogo) surface.DrawTexturedRect(scrw * 0.00125 + vp.z, scrh * 0.9 + vp.x + SScaleY(16) * 0.25, SScaleX(16), SScaleY(16)) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/PuristMode.lua b/beatrun/gamemodes/beatrun/gamemode/sh/PuristMode.lua index b2b2a8f..6b8d045 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/PuristMode.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/PuristMode.lua @@ -1,11 +1,11 @@ if CLIENT then - CreateClientConVar("Beatrun_PuristMode", "1", true, true, "Purist mode is a clientside preference that severely weakens the ability to strafe while in the air, which is how Mirror's Edge games handle this.\n0 = No restrictions\n1 = Reduced move speed in the air", 0, 1) + CreateClientConVar("Beatrun_PuristMode", "1", true, true, "Purist mode is a clientside preference that severely weakens the ability to strafe while in the air, which is how Mirror's Edge games handle this.\n0 = No restrictions\n1 = Reduced move speed in the air") end local PuristModeForce = CreateConVar("Beatrun_PuristModeForce", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "Force players to adhere to purist rules", 0, 1) local function PuristMove(ply, mv, cmd) - local PuristMode = ply:GetConVar("Beatrun_PuristMode") + local PuristMode = tobool(ply:GetInfo("Beatrun_PuristMode")) if not ply:OnGround() and not ply:GetGrappling() then if (PuristMode:GetBool() or PuristModeForce:GetBool()) and ply:WaterLevel() == 0 then