mirror of
https://github.com/CapsAdmin/pac3.git
synced 2025-03-04 03:03:01 -05:00
keep original proxy data in .vmt files #1308
This commit is contained in:
parent
0cdf58b9ff
commit
5ba3b262b1
@ -597,9 +597,12 @@ function pac.DownloadMDL(url, callback, onfail, ply)
|
|||||||
|
|
||||||
for i, data in ipairs(files) do
|
for i, data in ipairs(files) do
|
||||||
if data.file_name:EndsWith(".vmt") then
|
if data.file_name:EndsWith(".vmt") then
|
||||||
|
local proxies = data.buffer:match('("?%f[%w_]P?p?roxies%f[^%w_]"?%s*%b{})')
|
||||||
data.buffer = data.buffer:lower():gsub("\\", "/")
|
data.buffer = data.buffer:lower():gsub("\\", "/")
|
||||||
:gsub('("?%f[%w_]playercolor%f[^%w_]"?)','PlayerColor')
|
|
||||||
:gsub('("?%f[%w_]playerweaponcolor%f[^%w_]"?)','PlayerWeaponColor')
|
if proxies then
|
||||||
|
data.buffer = data.buffer:gsub('("?%f[%w_]proxies%f[^%w_]"?%s*%b{})', proxies)
|
||||||
|
end
|
||||||
|
|
||||||
if DEBUG_MDL or VERBOSE then
|
if DEBUG_MDL or VERBOSE then
|
||||||
print(data.file_name .. ":")
|
print(data.file_name .. ":")
|
||||||
|
Loading…
Reference in New Issue
Block a user