mirror of
https://github.com/JonnyBro/beatrun.git
synced 2025-01-01 14:53:02 +05:00
Another fix for Presences =)
This commit is contained in:
parent
6176b706a1
commit
e7d24c57a1
4 changed files with 9 additions and 21 deletions
|
@ -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")
|
require("gdiscord")
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ local eventslut = {
|
||||||
jumpstill = "jumpstill",
|
jumpstill = "jumpstill",
|
||||||
climb = "hanghardstartvertical",
|
climb = "hanghardstartvertical",
|
||||||
stepup = "stepuprightleg",
|
stepup = "stepuprightleg",
|
||||||
springboard = "jumpfast",
|
springboard = "springboardleftleg",
|
||||||
ladderexittoplefthand = "ladderexittoplefthand",
|
ladderexittoplefthand = "ladderexittoplefthand",
|
||||||
slide45 = "meslidestart45",
|
slide45 = "meslidestart45",
|
||||||
sidestepright = "dodgejumpright",
|
sidestepright = "dodgejumpright",
|
||||||
|
|
|
@ -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 richtext = ""
|
||||||
local nextupdate = 0
|
local refresh_time = 60
|
||||||
|
|
||||||
local function UpdateRichPresence()
|
local function UpdateRichPresence()
|
||||||
if CurTime() < nextupdate then return end
|
|
||||||
|
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
if not ply.GetLevel then return end
|
if not ply.GetLevel then return end
|
||||||
|
|
||||||
|
@ -25,23 +25,11 @@ local function UpdateRichPresence()
|
||||||
richtext = updatedtext
|
richtext = updatedtext
|
||||||
|
|
||||||
steamworks.SetRichPresence("generic", richtext)
|
steamworks.SetRichPresence("generic", richtext)
|
||||||
print("Updating presence")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
nextupdate = CurTime() + 60
|
|
||||||
end
|
|
||||||
|
|
||||||
local function LoadRichPresenceDLL()
|
|
||||||
require("steamrichpresencer")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("OnGamemodeLoaded", "LoadDLL", function()
|
hook.Add("OnGamemodeLoaded", "LoadDLL", function()
|
||||||
local dllfound = pcall(LoadRichPresenceDLL)
|
UpdateRichPresence()
|
||||||
LoadRichPresenceDLL = nil
|
|
||||||
|
|
||||||
if not dllfound then
|
timer.Create("UpdateSteamRichPresence", refresh_time, 0, UpdateRichPresence)
|
||||||
hook.Remove("Tick", "UpdateRichPresence")
|
|
||||||
else
|
|
||||||
hook.Add("Tick", "UpdateRichPresence", UpdateRichPresence)
|
|
||||||
end
|
|
||||||
end)
|
end)
|
|
@ -23,7 +23,7 @@ local function Dive(ply, mv, cmd)
|
||||||
ply:SetCrouchJumpTime(CurTime() + 1.65)
|
ply:SetCrouchJumpTime(CurTime() + 1.65)
|
||||||
ply:SetDive(true)
|
ply:SetDive(true)
|
||||||
|
|
||||||
ply:ViewPunch(Angle(-6,0,0))
|
ply:ViewPunch(Angle(-10, 0, 0))
|
||||||
|
|
||||||
ParkourEvent("divestart", ply)
|
ParkourEvent("divestart", ply)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue