Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thorsummoner
ttt_terrorcon
Commits
1b00c6b9
Commit
1b00c6b9
authored
Sep 18, 2021
by
dylan grafmyre
Browse files
make file for physics settle, nav gen
parent
8c167c02
Changes
4
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
1b00c6b9
...
...
@@ -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
...
...
lua/ipc_bsploaded.lua
0 → 100644
View file @
1b00c6b9
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
)
lua/map_edit.lua
0 → 100644
View file @
1b00c6b9
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
)
workarounds/nav_generate.ahk
0 → 100644
View file @
1b00c6b9
SetKeyDelay, 50 ; 20/sec
Sleep, 30000 ; 30 sec
Send, {``}
Sleep, 2000 ; 2 sec
Send, nav_generate{;}quit{Enter}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment