preset validity check + unoptimiz MultiSight to be able to override it

This commit is contained in:
Darsu 2025-01-03 04:45:56 +07:00
parent 1b21b72f1f
commit a5c1e2e7e0
2 changed files with 3 additions and 2 deletions

View File

@ -513,6 +513,7 @@ function SWEP:ImportPresetCode(str)
end
function SWEP:SplitPresetContents(str)
if !isstring(str) then return end
if str[1] != "[" then return end
if !string.find(str, "]X") then return end
local name = string.sub(string.Split(str, "]")[1], 2)

View File

@ -318,14 +318,14 @@ do
end
if pratt then
swepBuildMultiSight(self)
self:BuildMultiSight()
end
else
if sighted and !inatt then
swepExitSights(self)
elseif not sighted and inatt then
self:EnterSights()
swepBuildMultiSight(self)
self:BuildMultiSight()
end
end