diff --git a/LAUNCH compile.cmd b/LAUNCH compile.cmd index 3c46db4..1508ddd 100644 --- a/LAUNCH compile.cmd +++ b/LAUNCH compile.cmd @@ -15,7 +15,7 @@ @title Map Batch Compiler -@set CUSTOMCOMPILERS="%CMD_LC_ROOT%\bin" +@set CUSTOMCOMPILERS="%CMD_LC_ROOT%bin" @DEL "%CUSTOMCOMPILERS%" /S /Q /F >nul @@ -147,7 +147,10 @@ if not %TESTBUILD%==1 "%CUSTOMCOMPILERS%\vvis.exe" -low "%mapfolder%\%mapname%" @if ERRORLEVEL 1 goto failed + :vrad +@if %NOLDR%==1 goto vradhdr + :vradldr @echo ================= VRAD LDR ================================================ 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" @goto missingcsstf_finish :missingcsstf_fail -echo ">>>>>>> !!!FAILED!!! (non fatal) " +@echo ">>>>>>> !!!FAILED!!! (non fatal) " :missingcsstf_skip -echo Skipping... +@echo Skipping... :missingcsstf_finish :extrabspzip @@ -262,20 +265,28 @@ echo Skipping packing. "%mapfile%.bspzip" not found. :extrabspzip_ok - +@if %NOLDR%==1 goto hdr :ldr @echo ================= Generating LDR Cubemaps ================= @cd /d "%CMD_LC_ROOT%" call extras\gmodcommander.cmd cubemaps_ldr "%mapname%" -@if ERRORLEVEL 1 goto failed +@if ERRORLEVEL 1 goto ldrfail +goto ldrok +:ldrfail +@echo WARNING: LDR builder CRASHED (ignoring). The map may still work. +:ldrok @cd /d "%CMD_LC_ROOT%" :hdr @echo ================= Generating HDR Cubemaps ================= @cd /d "%CMD_LC_ROOT%" @call extras\gmodcommander.cmd cubemaps_hdr "%mapname%" -@if ERRORLEVEL 1 goto failed +@if ERRORLEVEL 1 goto hdrfail +goto hdrok +:hdrfail +@echo WARNING: HDR builder CRASHED (ignoring). The map may still work. +:hdrok @cd /d "%CMD_LC_ROOT%" :navmesh diff --git a/LAUNCH hammer.cmd b/LAUNCH hammer.cmd index 2f0d5e5..38d28e3 100644 --- a/LAUNCH hammer.cmd +++ b/LAUNCH hammer.cmd @@ -2,11 +2,11 @@ @call config.bat @echo Tweaking max draw distances... -@reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v BackPlane /t REG_DWORD /d 20000 /f -@reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v ModelDistance /t REG_DWORD /d 15000 /f -@reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v DetailDistance /t REG_DWORD /d 5000 /f -@reg ADD "HKCU\Software\Valve\Hammer\2D Views" /v RotateConstrain /t REG_DWORD /d 1 /f -@reg ADD "HKCU\Software\Valve\Hammer\Splitter" /v "DrawType0,0" /t REG_DWORD /d 9 /f +reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v BackPlane /t REG_DWORD /d 20000 /f +reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v ModelDistance /t REG_DWORD /d 15000 /f +reg ADD "HKCU\Software\Valve\Hammer\3D Views" /v DetailDistance /t REG_DWORD /d 5000 /f +reg ADD "HKCU\Software\Valve\Hammer\2D Views" /v RotateConstrain /t REG_DWORD /d 1 /f +reg ADD "HKCU\Software\Valve\Hammer\Splitter" /v "DrawType0,0" /t REG_DWORD /d 9 /f @cd /D "%sourcesdk%\bin" @set SteamAppId=243750 @@ -15,6 +15,6 @@ @echo Project: %VProject% -start hammer.exe %HammerParams% %* -dxlevel 81 +start hammer.exe %HammerParams% %* -dxlevel 96 @ping 127.0.0.1 -n 3 > nul diff --git a/config.bat b/config.bat index a7179e6..f9116f3 100644 --- a/config.bat +++ b/config.bat @@ -5,6 +5,8 @@ @set SteamAppUser=dummy @set HammerParams=-nop4 +@set NOLDR=0 + @call user_config.cmd @set SteamUser=%SteamAppUser% @@ -122,8 +124,8 @@ @set TESTPATH=%SteamPath% @IF NOT EXIST "%TESTPATH%" @GOTO fail -@java.exe -version >nul 2>nul -@IF %ERRORLEVEL% NEQ 0 @GOTO failjava +@rem @java.exe -version >nul 2>nul +@rem @IF %ERRORLEVEL% NEQ 0 @GOTO failjava @goto end diff --git a/extras/bsppack.dll b/extras/bsppack.dll new file mode 100644 index 0000000..4f5fa71 Binary files /dev/null and b/extras/bsppack.dll differ diff --git a/extras/bspzip.exe b/extras/bspzip.exe new file mode 100644 index 0000000..a0e81b5 Binary files /dev/null and b/extras/bspzip.exe differ diff --git a/extras/mapcomp_write_missing.lua b/extras/mapcomp_write_missing.lua index 0a434b6..ea2fb7a 100644 --- a/extras/mapcomp_write_missing.lua +++ b/extras/mapcomp_write_missing.lua @@ -91,6 +91,7 @@ local function retry() if cs then return 'cstrike' end if file.Exists(txt,'tf') then return 'tf' end + if file.Exists(txt,'csgo') then return 'csgo' end if file.Exists(txt,'episodic') then return 'episodic' end if file.Exists(txt,'ep2') then return 'ep2' end @@ -132,9 +133,20 @@ local function retry() local l,r=dat:find("\0",1,true) assert(l,r) local path=dat:sub(1,l-1) + local ispatch = path:find"^maps/" + if ispatch then + -- So far no need to parse the vmt it seems + local realpath = path:match("^maps/[^/]+/(.*)_%-?%d+_%-?%d+_%-?%d+$") + if realpath then + path=realpath + ispatch=false + else + print("parsefail",path) + end + end total_count=total_count+1 - if not path:find"^maps/" and not path:find"^decals/" then + if not ispatch and not path:find"^decals/" then paths[#paths+1]=path end diff --git a/extras/navmesh.lua b/extras/navmesh.lua index d2f7fe2..86bcc4f 100644 --- a/extras/navmesh.lua +++ b/extras/navmesh.lua @@ -1,11 +1,25 @@ +print"navmesh.lua running..." local navmeshregen - pcall(require,'landmark') if not landmark or not landmark.get then system.FlashWindow() print"UNABLE TO LOAD LANDMARK MODULE" end +if GetConVar("con_nprint_bgalpha"):GetString()=="quit" then + print "quitting..." + RunConsoleCommand("exitgame") + if CLIENT then + LocalPlayer():ConCommand('exitgame',true) + else + player.GetHumans()[1]:ConCommand('exitgame',true) + end + if game.ConsoleCommand then + game.ConsoleCommand( "exitgame\n" ) + end + return +end + if GetConVar("con_nprint_bgalpha"):GetString()~="navmesh" then navmeshregen=true if GetConVar("con_nprint_bgalpha"):GetString()~="navmeshregen" then @@ -13,7 +27,7 @@ if GetConVar("con_nprint_bgalpha"):GetString()~="navmesh" then end end -RunConsoleCommand("con_nprint_bgalpha","") +RunConsoleCommand("con_nprint_bgalpha","quit") local i=68 hook.Add("Think","agwegwegg",function() @@ -73,9 +87,16 @@ hook.Add("Think","agwegwegg",function() hook.Add("ShutDown","agwegwegg",function() print"Quitting...?" - + system.FlashWindow() RunConsoleCommand("exitgame") - + if CLIENT then + LocalPlayer():ConCommand('exitgame',true) + else + player.GetHumans()[1]:ConCommand('exitgame',true) + end + if game.ConsoleCommand then + game.ConsoleCommand( "exitgame\n" ) + end end) timer.Simple(1,function() print"built test?" end) timer.Simple(60*2,function()