Another fix for Presences =)

This commit is contained in:
Jonny_Bro (Nikita) 2023-07-21 23:03:52 +05:00
parent 6176b706a1
commit e7d24c57a1
4 changed files with 9 additions and 21 deletions

View file

@ -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")

View file

@ -232,7 +232,7 @@ local eventslut = {
jumpstill = "jumpstill",
climb = "hanghardstartvertical",
stepup = "stepuprightleg",
springboard = "jumpfast",
springboard = "springboardleftleg",
ladderexittoplefthand = "ladderexittoplefthand",
slide45 = "meslidestart45",
sidestepright = "dodgejumpright",

View file

@ -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)

View file

@ -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)