Commit 1b00c6b9 authored by dylan grafmyre's avatar dylan grafmyre
Browse files

make file for physics settle, nav gen

parent 8c167c02
......@@ -116,7 +116,7 @@ maps/%.bsp: %.bsp
$(BSP_BIN) $(VBIN_FLAGS) $(basename $^)
$(VIS_BIN) $(VBIN_FLAGS) $(basename $^)
$(RAD_BIN) -both -final $(VBIN_FLAGS) $(basename $^)
ln -f $(@:_hdr_final.bsp=.vmf) $(@:_hdr_final.bsp=_hdr.vmf)
ln -f $(@:_hdr_final.bsp=.vmf) $(@:_hdr_final.bsp=_hdr_final.vmf)
mv $(@:_hdr_final.bsp=.bsp) $@
$(GEN_BSPZIP_ADDLIST_BIN) $(GEN_BSPZIP_ADDLIST_FLAGS) $^ > $(@:.bsp=.bspzip-addlist)
......@@ -143,16 +143,31 @@ maps/%.bsp: %.bsp
"'$(GAME_DIR)$(GAME)'" -allowdebug $(VBIN_FLAGS) $(GAME_FLAGS) $(GAME_TTT_FLAGS) +sv_cheats 1 \
+mat_specular 0 +mat_hdr_level 0 +map $(notdir $(basename $^))
%.mapedit: %.bsp
# compile map from vmf
# settle physics
%.setphys: %.bsp
# precompile map from vmf
mkdir -p "$(MOD_DIR)/mapsrc"
ln -f "$^" "$(MOD_DIR)/maps/setphys.bsp"
ln -f "$(^:.bsp=.vmf)" "$(MOD_DIR)/mapsrc/setphys.vmf"
ln -f "lua/map_edit.lua" "$(MOD_DIR)/mapsrc/lua/autorun/runme.lua"
# open vmf in hammer
"$(VBIN_DIR)/hammer.exe" "$(MOD_DIR)/mapsrc/setphys.vmf" &
sleep 2
# open bsp in game via map_edit
# wait
# flush via hammer_update_entity
$(SHLEX_BIN) $(SHLEX_FLAGS) $(SHLEX_HL2LOG_FLAGS) \
"'$(GAME_DIR)$(GAME)'" -allowdebug $(VBIN_FLAGS) $(GAME_FLAGS) $(GAME_TTT_FLAGS) \
+sv_cheats 1 +map_edit $(notdir $(basename $^))
+lua_run "print('manual tasks: [hammer_update_entity, quit]');"
+sv_cheats 1 +map_edit setphys
rm -v "$(MOD_DIR)/mapsrc/lua/autorun/runme.lua"
rm -v "$(MOD_DIR)/mapsrc/setphys.vmf"
rm -v "$(MOD_DIR)/maps/setphys.bsp"
%.nav: %.bsp
./workarounds/nav_generate.exe &
$(SHLEX_BIN) $(SHLEX_FLAGS) $(SHLEX_HL2LOG_FLAGS) \
"'$(GAME_DIR)$(GAME)'" -allowdebug $(VBIN_FLAGS) $(GAME_FLAGS) $(GAME_TTT_FLAGS) \
+sv_cheats 1 +nav_edit 1 +map $(notdir $(basename $^))
cp -v "$(MOD_DIR)/maps/$(notdir $(basename $^)).nav" $@
# only ents works on an existing bsp,
# which are not typically left "in place" for this operation
......
GMOD_BSP_LOAD_OK = 'gbspldok'
-- dec = 7449643660316274539
-- hex = 0x676273706c646f6b
local function main()
print( "ipc_bsploaded:main: buildcubemaps write ..." )
file.Write( 'ipc_bsploaded.sock', GMOD_BSP_LOAD_OK + '\n' )
print( "ipc_bsploaded:main: buildcubemaps write ... done" )
end
timer.Simple( 2, main )
local function main()
print( "map_edit:main: manual tasks: ['hammer_update_entity prop_physics; hammer_update_entity prop_physics_multiplayer; quit', <save and close hammer>]" )
end
timer.Simple( 2, main )
SetKeyDelay, 50 ; 20/sec
Sleep, 30000 ; 30 sec
Send, {``}
Sleep, 2000 ; 2 sec
Send, nav_generate{;}quit{Enter}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment