-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameplaySmoothness.lua
41 lines (36 loc) · 1.07 KB
/
GameplaySmoothness.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
-- https://forum.nostalrius.org/viewtopic.php?t=1100&f=32
-- If game was started with `-console` open shell with backtick and
-- type `gxRestart` to restart the graphics engine.
local feature = ns.Register({
identifier = "GameplaySmoothness",
description = "Optimises for smoother gameplay. Requires game restart.",
category = "utility",
config = {
cmds = {
"bspcache",
"gxFixLag",
"gxTripleBuffer",
"M2UsePixelShaders",
"M2UseZFill",
"M2UseClipPlanes",
"M2UseThreads",
"M2UseShaders",
"M2BatchDoodads",
},
},
})
local frame = CreateFrame("Frame")
frame:RegisterEvent("ADDON_LOADED")
frame:SetScript("OnEvent", function()
if not ns.IsEnabled(feature.identifier) then
-- Reset to default game values.
for _, cmd in pairs(feature.config.cmds) do
SlashCmdList["CONSOLE"](string.format("%s 0", cmd))
end
return
end
SlashCmdList["CONSOLE"]("M2Faster 3") -- Quad-core and above.
for _, cmd in pairs(feature.config.cmds) do
SlashCmdList["CONSOLE"](string.format("%s 1", cmd))
end
end)