From 0347a6f6e88c4242f14488df81284a7a410a3600 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Fri, 8 Sep 2023 21:40:09 +0500 Subject: [PATCH] hide mw base weapons when rolling --- beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua index 5ccd087..d43f73b 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua @@ -13,6 +13,8 @@ local function SafetyRollThink(ply, mv, cmd) mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_DUCK))) end + if CurTime() > ply:GetSafetyRollTime() and weapons.IsBasedOn(ply:GetActiveWeapon():GetClass(), "mg_base") then RunConsoleCommand("mgbase_debug_vmrender", "1") end + if CurTime() < ply:GetSafetyRollTime() then ply.FootstepLand = false @@ -126,6 +128,8 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed) ParkourEvent("roll", ply) + if (weapons.IsBasedOn(ply:GetActiveWeapon():GetClass(), "mg_base")) then RunConsoleCommand("mgbase_debug_vmrender", "0") end + local ang = ply:EyeAngles() local land = ply:GetVelocity() ang.x = 0