From e7d24c57a1b05db82e17173d632633f028268aba Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Fri, 21 Jul 2023 23:03:52 +0500 Subject: [PATCH] Another fix for Presences =) --- .../beatrun/gamemode/cl/DiscordPresence.lua | 2 +- .../beatrun/gamemode/cl/JumpAnim.lua | 2 +- .../beatrun/gamemode/cl/SteamPresence.lua | 24 +++++-------------- .../gamemodes/beatrun/gamemode/sh/Dive.lua | 2 +- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua b/beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua index c574324..9259173 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua @@ -1,4 +1,4 @@ -if file.Find("lua/bin/gmcl_gdiscord_*.dll", "GAME") == nil then return end +if not util.IsBinaryModuleInstalled("gdiscord", "GAME") then return end require("gdiscord") diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/JumpAnim.lua b/beatrun/gamemodes/beatrun/gamemode/cl/JumpAnim.lua index 8bbb42e..682c5b6 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/JumpAnim.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/JumpAnim.lua @@ -232,7 +232,7 @@ local eventslut = { jumpstill = "jumpstill", climb = "hanghardstartvertical", stepup = "stepuprightleg", - springboard = "jumpfast", + springboard = "springboardleftleg", ladderexittoplefthand = "ladderexittoplefthand", slide45 = "meslidestart45", sidestepright = "dodgejumpright", diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/SteamPresence.lua b/beatrun/gamemodes/beatrun/gamemode/cl/SteamPresence.lua index ee675d4..a0453aa 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/SteamPresence.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/SteamPresence.lua @@ -1,11 +1,11 @@ -if file.Find("lua/bin/gmcl_steamrichpresencer_*.dll", "GAME") == nil then return end +if not util.IsBinaryModuleInstalled("steamrichpresencer", "GAME") then return end + +require("steamrichpresencer") local richtext = "" -local nextupdate = 0 +local refresh_time = 60 local function UpdateRichPresence() - if CurTime() < nextupdate then return end - local ply = LocalPlayer() if not ply.GetLevel then return end @@ -25,23 +25,11 @@ local function UpdateRichPresence() richtext = updatedtext steamworks.SetRichPresence("generic", richtext) - print("Updating presence") end - - nextupdate = CurTime() + 60 -end - -local function LoadRichPresenceDLL() - require("steamrichpresencer") end hook.Add("OnGamemodeLoaded", "LoadDLL", function() - local dllfound = pcall(LoadRichPresenceDLL) - LoadRichPresenceDLL = nil + UpdateRichPresence() - if not dllfound then - hook.Remove("Tick", "UpdateRichPresence") - else - hook.Add("Tick", "UpdateRichPresence", UpdateRichPresence) - end + timer.Create("UpdateSteamRichPresence", refresh_time, 0, UpdateRichPresence) end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua index cbe3666..863c6a7 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua @@ -23,7 +23,7 @@ local function Dive(ply, mv, cmd) ply:SetCrouchJumpTime(CurTime() + 1.65) ply:SetDive(true) - ply:ViewPunch(Angle(-6,0,0)) + ply:ViewPunch(Angle(-10, 0, 0)) ParkourEvent("divestart", ply)