Skip to content

Commit

Permalink
Add NOLDR option
Browse files Browse the repository at this point in the history
Increase dxlevel for hammer again
Check patches for textures
Fix navmesh compiling not quitting
Bundle bsppack that allows compression (not used)
  • Loading branch information
Python1320 committed Dec 9, 2018
1 parent 72f0453 commit c44c190
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 19 deletions.
23 changes: 17 additions & 6 deletions LAUNCH compile.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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%"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions LAUNCH hammer.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
6 changes: 4 additions & 2 deletions config.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
@set SteamAppUser=dummy
@set HammerParams=-nop4

@set NOLDR=0

@call user_config.cmd

@set SteamUser=%SteamAppUser%
Expand Down Expand Up @@ -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

Expand Down
Binary file added extras/bsppack.dll
Binary file not shown.
Binary file added extras/bspzip.exe
Binary file not shown.
14 changes: 13 additions & 1 deletion extras/mapcomp_write_missing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
29 changes: 25 additions & 4 deletions extras/navmesh.lua
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
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
return
end
end

RunConsoleCommand("con_nprint_bgalpha","")
RunConsoleCommand("con_nprint_bgalpha","quit")

local i=68
hook.Add("Think","agwegwegg",function()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit c44c190

Please sign in to comment.