-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
navmesh compiling, fix cubemaps compiler maybe
propper changes
- Loading branch information
1 parent
bf78795
commit 984fc8c
Showing
7 changed files
with
424 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
if GetConVar("con_nprint_bgalpha"):GetString()=="cubemaps" then | ||
|
||
local i=120 | ||
hook.Add("Think","agwegwegg",function() | ||
i=i-1 | ||
if i>0 then return end | ||
|
||
hook.Remove("Think","agwegwegg") | ||
RunConsoleCommand"bcmaps" | ||
hook.Add("ShutDown","agwegwegg",function() | ||
print"Quitting..." | ||
|
||
FindMetaTable"Player".ConCommand(nil,"exitgame",true) | ||
end) | ||
end) | ||
if GetConVar("con_nprint_bgalpha"):GetString()=="cubemaps" then | ||
|
||
local i=120 | ||
hook.Add("Think","agwegwegg",function() | ||
i=i-1 | ||
if i>0 then return end | ||
|
||
hook.Remove("Think","agwegwegg") | ||
RunConsoleCommand"bcmaps" | ||
print"\n!!!!!BUILDING CUBEMAPS!!!!!!!!\n" | ||
hook.Add("ShutDown","agwegwegg",function() | ||
print"Quitting..." | ||
|
||
FindMetaTable"Player".ConCommand(nil,"exitgame",true) | ||
end) | ||
timer.Simple(1,function() print"cubemaps built test?" end) | ||
timer.Simple(60*2,function() | ||
FindMetaTable"Player".ConCommand(nil,"exitgame",true) | ||
end) | ||
end) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,59 @@ | ||
@cd /d "%~dp0" | ||
@cd .. | ||
@call config.bat | ||
@cd /d "%~dp0" | ||
|
||
|
||
|
||
copy /Y build_cubemaps.lua "%GameDir%"\lua\autorun\client\build_cubemaps.lua > nul | ||
@if ERRORLEVEL 1 goto fail | ||
|
||
copy /Y gmodcommander.cfg "%GameDir%"\cfg\gmodcommander.cfg > nul | ||
@if ERRORLEVEL 1 goto fail | ||
|
||
copy /Y mapcomp_write_missing.lua "%GameDir%"\lua\autorun\client\mapcomp_write_missing.lua > nul | ||
@if ERRORLEVEL 1 goto fail | ||
|
||
@cd /D %GameExeDir% | ||
@If "%1"=="missing" @goto missing | ||
@If "%1"=="cubemaps_ldr" @goto cubemaps_ldr | ||
@If "%1"=="cubemaps_hdr" @goto cubemaps_hdr | ||
|
||
@echo "Unknown task: %1" | ||
@exit 1 | ||
@goto out | ||
|
||
:missing | ||
start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -dev -disableluarefresh -insecure -nohltv -condebug -textmode -toconsole +map %2 +alias "exitgame quit" +con_nprint_bgalpha writemissing | ||
@goto win | ||
|
||
:cubemaps_ldr | ||
@rem start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 0 +mat_specular 0 -buildcubemaps | ||
start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 0 +mat_specular 0 +exec gmodcommander +con_nprint_bgalpha cubemaps | ||
@goto win | ||
|
||
:cubemaps_hdr | ||
@rem start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 2 +mat_specular 0 -buildcubemaps | ||
start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 2 +mat_specular 0 +exec gmodcommander +con_nprint_bgalpha cubemaps | ||
@goto win | ||
|
||
@goto win | ||
:fail | ||
@echo SUBTASK FAILED | ||
@pause > nul | ||
@goto out | ||
|
||
:win | ||
@echo Subtask finished | ||
@goto out | ||
|
||
:out | ||
@rem @del "%GameDir%"\lua\autorun\client\build_cubemaps.lua | ||
@del "%GameDir%"\lua\autorun\client\mapcomp_write_missing.lua | ||
@cd /d "%~dp0" | ||
@cd .. | ||
@call config.bat | ||
@cd /d "%~dp0" | ||
|
||
|
||
|
||
copy /Y build_cubemaps.lua "%GameDir%"\lua\autorun\client\build_cubemaps.lua > nul | ||
@if ERRORLEVEL 1 goto fail | ||
|
||
copy /Y gmodcommander.cfg "%GameDir%"\cfg\gmodcommander.cfg > nul | ||
@if ERRORLEVEL 1 goto fail | ||
|
||
copy /Y mapcomp_write_missing.lua "%GameDir%"\lua\autorun\client\mapcomp_write_missing.lua > nul | ||
@if ERRORLEVEL 1 goto fail | ||
|
||
copy /Y navmesh.lua "%GameDir%"\lua\autorun\server\navmesh.lua > nul | ||
@if ERRORLEVEL 1 goto fail | ||
|
||
@cd /D %GameExeDir% | ||
@If "%1"=="missing" @goto missing | ||
@If "%1"=="cubemaps_ldr" @goto cubemaps_ldr | ||
@If "%1"=="navmesh" @goto navmesh | ||
@If "%1"=="cubemaps_hdr" @goto cubemaps_hdr | ||
|
||
@echo "ERROR: Unknown task: %1" | ||
@goto out | ||
|
||
:missing | ||
start /wait /min hl2.exe -game "%GameDir%" -multirun -disableluarefresh -noworkshop -windowed %GCNOADDONS% -insecure -nohltv -condebug -textmode -toconsole +map %2 +exec gmodcommander +con_nprint_bgalpha writemissing | ||
@goto win | ||
|
||
:cubemaps_ldr | ||
@rem start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 0 +mat_specular 0 -buildcubemaps | ||
start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -noworkshop %GCNOADDONS% -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 0 +mat_specular 0 +exec gmodcommander +con_nprint_bgalpha cubemaps | ||
@goto win | ||
|
||
:cubemaps_hdr | ||
@rem start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 2 +mat_specular 0 -buildcubemaps | ||
start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -noworkshop %GCNOADDONS% -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 2 +mat_specular 0 +exec gmodcommander +con_nprint_bgalpha cubemaps | ||
@goto win | ||
|
||
:navmesh | ||
start /wait /min hl2.exe -game "%GameDir%" -multirun -console -noworkshop %GCNOADDONS% -windowed -disableluarefresh -insecure -nohltv -condebug -textmode -toconsole +map %2 +exec gmodcommander +con_nprint_bgalpha navmesh | ||
@goto win | ||
|
||
@goto win | ||
:fail | ||
@echo SUBTASK FAILED | ||
@pause > nul | ||
@goto out | ||
|
||
:win | ||
@echo Subtask finished | ||
@goto out | ||
|
||
:out | ||
@rem @del "%GameDir%"\lua\autorun\client\build_cubemaps.lua | ||
@rem del "%GameDir%"\lua\autorun\client\mapcomp_write_missing.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
if GetConVar("con_nprint_bgalpha"):GetString()~="navmesh" then return end | ||
|
||
local i=68 | ||
hook.Add("Think","agwegwegg",function() | ||
i=i-1 | ||
if i>0 then return end | ||
hook.Remove("Think","agwegwegg") | ||
|
||
print"\n!!!!!BUILDING NAVMESH!!!!!!!!\n" | ||
|
||
if not navmesh.IsLoaded() then navmesh.Load() end | ||
|
||
if navmesh.IsLoaded() then | ||
print"navmesh found, leaving..." | ||
RunConsoleCommand("exitgame") | ||
return | ||
end | ||
|
||
--TODO | ||
local f = file.Read("navmesh_seed.txt",'DATA') | ||
for v in (f or ""):gmatch'[^\r\n]+' do | ||
if v and v:find"%d %d" then | ||
print("seeding",v,navmesh.AddWalkableSeed(Vector(v),Vector(0,0,1))) | ||
end | ||
end | ||
print("begin",navmesh.BeginGeneration()) | ||
|
||
hook.Add("ShutDown","agwegwegg",function() | ||
print"Quitting...?" | ||
|
||
RunConsoleCommand("exitgame") | ||
|
||
end) | ||
timer.Simple(1,function() print"built test?" end) | ||
timer.Simple(60*2,function() | ||
hook.Add("Think",'agwegwegg',function() | ||
if navmesh.IsGenerating() then return end | ||
hook.Remove("Think","agwegwegg") | ||
print("save",navmesh.Save()) | ||
RunConsoleCommand("exitgame") | ||
end) | ||
|
||
end) | ||
end) |
Oops, something went wrong.