Fix Purist mode 💀

This commit is contained in:
Jonny_Bro (Nikita) 2023-06-05 13:09:26 +05:00
parent 9393b34d1e
commit fb55ec07be
6 changed files with 36 additions and 7 deletions

View file

@ -33,7 +33,7 @@ local customcycle = false
deathanim = false deathanim = false
local allowmove = false local allowmove = false
local allowedangchange = false local allowedangchange = false
local attach, attachId, weapontoidle = nil local attach, attachId, weapontoidle = nil, nil, nil
local smoothend = false local smoothend = false
local endlerp = 0 local endlerp = 0
camoffset = Vector() camoffset = Vector()
@ -452,7 +452,7 @@ function BodyAnimSetEase(pos)
end end
local lastattachpos = Vector(0, 0, 0) local lastattachpos = Vector(0, 0, 0)
local lastatt, savedatt = nil local lastatt, savedatt = nil, nil
local lerpchangeatt = 1 local lerpchangeatt = 1
local lastattdata = nil local lastattdata = nil
local lerpedpos = Vector() local lerpedpos = Vector()

View file

@ -1412,7 +1412,7 @@ hook.Add("Think", "FBAnimHandler", function()
lastwr = ply:GetWallrun() lastwr = ply:GetWallrun()
end) end)
local animtr, animtr_result = nil local animtr, animtr_result = nil, nil
local oldnewang = Angle() local oldnewang = Angle()
local function JumpThink() local function JumpThink()

View file

@ -141,6 +141,7 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
panel:CheckBox("Quickturn", "Beatrun_QuickturnGround") panel:CheckBox("Quickturn", "Beatrun_QuickturnGround")
panel:ControlHelp("Enables quickturning with secondary attack while on the ground") panel:ControlHelp("Enables quickturning with secondary attack while on the ground")
panel:CheckBox("Purist Mode", "Beatrun_PuristMode") panel:CheckBox("Purist Mode", "Beatrun_PuristMode")
panel:ControlHelp("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.\nDisabled = No restrictions\nEnabled = Reduced move speed in the air") panel:ControlHelp("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.\nDisabled = No restrictions\nEnabled = Reduced move speed in the air")
end) end)
@ -240,5 +241,33 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
StartDataTheft() StartDataTheft()
end end
panel:AddItem(DatatheftButton) panel:AddItem(DatatheftButton)
-- local divider = vgui.Create("DHorizontalDivider")
-- panel:AddItem(divider)
-- local LoadoutMenuButton = vgui.Create("DButton", panel)
-- LoadoutMenuButton:SetText("Open Loadouts Menu")
-- LoadoutMenuButton:SetSize(0, 20)
-- LoadoutMenuButton.DoClick = function()
-- local frame = vgui.Create("DFrame")
-- frame:SetTitle("Loadouts menu")
-- frame:SetSize(400, 300)
-- frame:SetDeleteOnClose(true)
-- frame:Center()
-- frame:MakePopup()
-- local TextEntry = vgui.Create("DTextEntry", frame)
-- TextEntry:Dock(TOP)
-- local okButton = vgui.Create("DButton", frame)
-- okButton:SetText("Change API Key")
-- okButton:SetPos(25, 60)
-- okButton:SetSize(250, 30)
-- okButton.DoClick = function()
-- RunConsoleCommand("Beatrun_LoadoutMenu", TextEntry:GetValue())
-- frame:Close()
-- end
-- end
-- panel:AddItem(LoadoutMenuButton)
end) end)
end) end)

View file

@ -6,9 +6,9 @@ local PuristModeForce = CreateConVar("Beatrun_PuristModeForce", 0, {FCVAR_REPLIC
local function PuristMove(ply, mv, cmd) local function PuristMove(ply, mv, cmd)
if not ply:OnGround() and not ply:GetGrappling() then if not ply:OnGround() and not ply:GetGrappling() then
local purist = ply:GetInfoNum("Beatrun_PuristMode", 0) local purist = PuristMode:GetBool()
if (purist > 0 or PuristModeForce:GetBool()) and ply:WaterLevel() == 0 then if (purist or PuristModeForce:GetBool()) and ply:WaterLevel() == 0 then
mv:SetForwardSpeed(mv:GetForwardSpeed() * 0.001) mv:SetForwardSpeed(mv:GetForwardSpeed() * 0.001)
mv:SetSideSpeed(mv:GetSideSpeed() * 0.001) mv:SetSideSpeed(mv:GetSideSpeed() * 0.001)

View file

@ -739,7 +739,7 @@ if CLIENT then
playerstart:SetNoDraw(true) playerstart:SetNoDraw(true)
local playerstartang = Angle() local playerstartang = Angle()
local ZiplineStart, _ = nil local ZiplineStart = nil
local ziplinemins = Vector(-8, -8, -8) local ziplinemins = Vector(-8, -8, -8)
local ziplinemaxs = Vector(8, 8, 8) local ziplinemaxs = Vector(8, 8, 8)

View file

@ -1,7 +1,7 @@
util.AddNetworkString("Beatrun_ToggleGamemode") util.AddNetworkString("Beatrun_ToggleGamemode")
util.AddNetworkString("Beatrun_UpdateDataTheftLoadout") util.AddNetworkString("Beatrun_UpdateDataTheftLoadout")
local datatheft, infection = false local datatheft, infection = false, false
net.Receive("Beatrun_ToggleGamemode", function(_, ply) net.Receive("Beatrun_ToggleGamemode", function(_, ply)
local gm = net.ReadString() local gm = net.ReadString()