Skip to content

Commit c44c190

Browse files
committed
Add NOLDR option
Increase dxlevel for hammer again Check patches for textures Fix navmesh compiling not quitting Bundle bsppack that allows compression (not used)
1 parent 72f0453 commit c44c190

File tree

7 files changed

+65
-19
lines changed

7 files changed

+65
-19
lines changed

LAUNCH compile.cmd

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@title Map Batch Compiler
1616

1717

18-
@set CUSTOMCOMPILERS="%CMD_LC_ROOT%\bin"
18+
@set CUSTOMCOMPILERS="%CMD_LC_ROOT%bin"
1919

2020

2121
@DEL "%CUSTOMCOMPILERS%" /S /Q /F >nul
@@ -147,7 +147,10 @@ if not %TESTBUILD%==1 "%CUSTOMCOMPILERS%\vvis.exe" -low "%mapfolder%\%mapname%"
147147
@if ERRORLEVEL 1 goto failed
148148

149149

150+
150151
:vrad
152+
@if %NOLDR%==1 goto vradhdr
153+
151154
:vradldr
152155
@echo ================= VRAD LDR ================================================
153156
if not %TESTBUILD%==1 "%CUSTOMCOMPILERS%\vrad.exe" -AllowDynamicPropsAsStatic -AllowDX90VTX -IgnoreModelVersions -low %VRADLDR% -ldr "%mapfolder%\%mapname%"
@@ -233,9 +236,9 @@ move "%GameDir%\maps\%mapname%.bsp.newx" "%GameDir%\maps\%mapname%.bsp"
233236

234237
@goto missingcsstf_finish
235238
:missingcsstf_fail
236-
echo ">>>>>>> !!!FAILED!!! (non fatal) "
239+
@echo ">>>>>>> !!!FAILED!!! (non fatal) "
237240
:missingcsstf_skip
238-
echo Skipping...
241+
@echo Skipping...
239242
:missingcsstf_finish
240243

241244
:extrabspzip
@@ -262,20 +265,28 @@ echo Skipping packing. "%mapfile%.bspzip" not found.
262265
:extrabspzip_ok
263266

264267

265-
268+
@if %NOLDR%==1 goto hdr
266269

267270
:ldr
268271
@echo ================= Generating LDR Cubemaps =================
269272
@cd /d "%CMD_LC_ROOT%"
270273
call extras\gmodcommander.cmd cubemaps_ldr "%mapname%"
271-
@if ERRORLEVEL 1 goto failed
274+
@if ERRORLEVEL 1 goto ldrfail
275+
goto ldrok
276+
:ldrfail
277+
@echo WARNING: LDR builder CRASHED (ignoring). The map may still work.
278+
:ldrok
272279
@cd /d "%CMD_LC_ROOT%"
273280

274281
:hdr
275282
@echo ================= Generating HDR Cubemaps =================
276283
@cd /d "%CMD_LC_ROOT%"
277284
@call extras\gmodcommander.cmd cubemaps_hdr "%mapname%"
278-
@if ERRORLEVEL 1 goto failed
285+
@if ERRORLEVEL 1 goto hdrfail
286+
goto hdrok
287+
:hdrfail
288+
@echo WARNING: HDR builder CRASHED (ignoring). The map may still work.
289+
:hdrok
279290
@cd /d "%CMD_LC_ROOT%"
280291

281292
:navmesh

LAUNCH hammer.cmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
@call config.bat
33

44
@echo Tweaking max draw distances...
5-
@reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v BackPlane /t REG_DWORD /d 20000 /f
6-
@reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v ModelDistance /t REG_DWORD /d 15000 /f
7-
@reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v DetailDistance /t REG_DWORD /d 5000 /f
8-
@reg ADD "HKCU\Software\Valve\Hammer\2D Views" /v RotateConstrain /t REG_DWORD /d 1 /f
9-
@reg ADD "HKCU\Software\Valve\Hammer\Splitter" /v "DrawType0,0" /t REG_DWORD /d 9 /f
5+
reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v BackPlane /t REG_DWORD /d 20000 /f
6+
reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v ModelDistance /t REG_DWORD /d 15000 /f
7+
reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v DetailDistance /t REG_DWORD /d 5000 /f
8+
reg ADD "HKCU\Software\Valve\Hammer\2D Views" /v RotateConstrain /t REG_DWORD /d 1 /f
9+
reg ADD "HKCU\Software\Valve\Hammer\Splitter" /v "DrawType0,0" /t REG_DWORD /d 9 /f
1010

1111
@cd /D "%sourcesdk%\bin"
1212
@set SteamAppId=243750
@@ -15,6 +15,6 @@
1515

1616
@echo Project: %VProject%
1717

18-
start hammer.exe %HammerParams% %* -dxlevel 81
18+
start hammer.exe %HammerParams% %* -dxlevel 96
1919

2020
@ping 127.0.0.1 -n 3 > nul

config.bat

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
@set SteamAppUser=dummy
66
@set HammerParams=-nop4
77

8+
@set NOLDR=0
9+
810
@call user_config.cmd
911

1012
@set SteamUser=%SteamAppUser%
@@ -122,8 +124,8 @@
122124
@set TESTPATH=%SteamPath%
123125
@IF NOT EXIST "%TESTPATH%" @GOTO fail
124126

125-
@java.exe -version >nul 2>nul
126-
@IF %ERRORLEVEL% NEQ 0 @GOTO failjava
127+
@rem @java.exe -version >nul 2>nul
128+
@rem @IF %ERRORLEVEL% NEQ 0 @GOTO failjava
127129

128130
@goto end
129131

extras/bsppack.dll

346 KB
Binary file not shown.

extras/bspzip.exe

354 KB
Binary file not shown.

extras/mapcomp_write_missing.lua

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ local function retry()
9191
if cs then return 'cstrike' end
9292

9393
if file.Exists(txt,'tf') then return 'tf' end
94+
if file.Exists(txt,'csgo') then return 'csgo' end
9495

9596
if file.Exists(txt,'episodic') then return 'episodic' end
9697
if file.Exists(txt,'ep2') then return 'ep2' end
@@ -132,9 +133,20 @@ local function retry()
132133
local l,r=dat:find("\0",1,true)
133134
assert(l,r)
134135
local path=dat:sub(1,l-1)
136+
local ispatch = path:find"^maps/"
137+
if ispatch then
135138

139+
-- So far no need to parse the vmt it seems
140+
local realpath = path:match("^maps/[^/]+/(.*)_%-?%d+_%-?%d+_%-?%d+$")
141+
if realpath then
142+
path=realpath
143+
ispatch=false
144+
else
145+
print("parsefail",path)
146+
end
147+
end
136148
total_count=total_count+1
137-
if not path:find"^maps/" and not path:find"^decals/" then
149+
if not ispatch and not path:find"^decals/" then
138150
paths[#paths+1]=path
139151
end
140152

extras/navmesh.lua

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1+
print"navmesh.lua running..."
12
local navmeshregen
2-
33
pcall(require,'landmark')
44
if not landmark or not landmark.get then
55
system.FlashWindow()
66
print"UNABLE TO LOAD LANDMARK MODULE"
77
end
88

9+
if GetConVar("con_nprint_bgalpha"):GetString()=="quit" then
10+
print "quitting..."
11+
RunConsoleCommand("exitgame")
12+
if CLIENT then
13+
LocalPlayer():ConCommand('exitgame',true)
14+
else
15+
player.GetHumans()[1]:ConCommand('exitgame',true)
16+
end
17+
if game.ConsoleCommand then
18+
game.ConsoleCommand( "exitgame\n" )
19+
end
20+
return
21+
end
22+
923
if GetConVar("con_nprint_bgalpha"):GetString()~="navmesh" then
1024
navmeshregen=true
1125
if GetConVar("con_nprint_bgalpha"):GetString()~="navmeshregen" then
1226
return
1327
end
1428
end
1529

16-
RunConsoleCommand("con_nprint_bgalpha","")
30+
RunConsoleCommand("con_nprint_bgalpha","quit")
1731

1832
local i=68
1933
hook.Add("Think","agwegwegg",function()
@@ -73,9 +87,16 @@ hook.Add("Think","agwegwegg",function()
7387

7488
hook.Add("ShutDown","agwegwegg",function()
7589
print"Quitting...?"
76-
90+
system.FlashWindow()
7791
RunConsoleCommand("exitgame")
78-
92+
if CLIENT then
93+
LocalPlayer():ConCommand('exitgame',true)
94+
else
95+
player.GetHumans()[1]:ConCommand('exitgame',true)
96+
end
97+
if game.ConsoleCommand then
98+
game.ConsoleCommand( "exitgame\n" )
99+
end
79100
end)
80101
timer.Simple(1,function() print"built test?" end)
81102
timer.Simple(60*2,function()

0 commit comments

Comments
 (0)