mirror of
https://github.com/Winded/StopMotionHelper.git
synced 2025-03-04 03:13:33 -05:00
Minor optimization with startatone convar
This commit is contained in:
parent
8440b1a126
commit
292225e57f
@ -1,3 +1,7 @@
|
||||
local smh_startatone = CreateClientConVar("smh_startatone", 0, true, false, nil, 0, 1)
|
||||
CreateClientConVar("smh_currentpreset", "default", true, false)
|
||||
|
||||
|
||||
concommand.Add("+smh_menu", function()
|
||||
SMH.Controller.OpenMenu()
|
||||
end)
|
||||
@ -41,7 +45,7 @@ end)
|
||||
concommand.Add("smh_makejpeg", function(pl, cmd, args)
|
||||
local startframe
|
||||
if args[1] then
|
||||
startframe = args[1] - GetConVar("smh_startatone"):GetInt()
|
||||
startframe = args[1] - smh_startatone:GetInt()
|
||||
else
|
||||
startframe = 0
|
||||
end
|
||||
@ -56,7 +60,7 @@ end)
|
||||
concommand.Add("smh_makescreenshot", function(pl, cmd, args)
|
||||
local startframe
|
||||
if args[1] then
|
||||
startframe = args[1] - GetConVar("smh_startatone"):GetInt()
|
||||
startframe = args[1] - smh_startatone:GetInt()
|
||||
else
|
||||
startframe = 0
|
||||
end
|
||||
@ -66,7 +70,4 @@ concommand.Add("smh_makescreenshot", function(pl, cmd, args)
|
||||
else
|
||||
print("Specified starting frame is outside of the current Frame Count!")
|
||||
end
|
||||
end)
|
||||
|
||||
CreateClientConVar("smh_startatone", 0, true, false, nil, 0, 1)
|
||||
CreateClientConVar("smh_currentpreset", "default", true, false)
|
||||
end)
|
Loading…
Reference in New Issue
Block a user