docs/guide: Quake maps and BSP, WAD2 / WAD3, lmp / spr, Quake III shaders and skins; bench lines; q3skin sniff needs a path
This commit is contained in:
1 parent
175ca9e823
commit
1e69799c21
11 files changed
+663
-461
No files matched your search
+7
-3
@@ -122159,16 +122159,20 @@ local head = r:peek(math.min(r:remaining(), 1024))
|
||||
if #head < 3 or string.find(head, "[%z\1-\8\14-\31]") then
|
||||
return 0
|
||||
end
|
||||
local lines, good = 0, 0
|
||||
local lines, good, paths = 0, 0, 0
|
||||
for line in __iter(string.gmatch(head, "[^\r\n]+")) do
|
||||
if not string.match(line, "^%s*$") then
|
||||
lines =lines+ 1
|
||||
if string.match(line, "^%s*[%w_%-]+%s*,%s*[^,%s]*%s*$") then
|
||||
local surface, shader = string.match(line, "^%s*([%w_%-]+)%s*,%s*([^,%s]*)%s*$")
|
||||
if surface and shader == "" and string.sub(string.lower(surface), 1, 4) == "tag_" then
|
||||
good =good+ 1
|
||||
elseif shader and string.find(shader, "/", 1, true) then
|
||||
good =good+ 1
|
||||
paths =paths+ 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return lines > 0 and good == lines and 0.5 or 0
|
||||
return lines > 0 and good == lines and paths > 0 and 0.5 or 0
|
||||
end
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ decode
|
||||
|
||||
Reference in new issue
Block a user