The loadout has always survived a race - gPersistSelection is why the setup screen reopens the way you left it - but only for as long as the process lived. Closing the game was a reset, and the callsign is the one thing on that screen a player types rather than picks, so it was the one they had to type again every launch. pilot.cfg beside bindings.txt now holds both, KEY=VALUE like environ.ini, one line per group. BT411 solved this first, in fe_last.ini, and its own comment says why RP412 never grew the file: BT411 relaunches the process between missions and would otherwise forget the loadout mid-evening, while RP412 stays in one process. That made the gap invisible from inside a session and total across two. Same idea, two differences worth naming: BT411 saves only on a launch - it returns before SavePersisted when the player quits. That loses a callsign typed by somebody who then changed their mind, which is exactly the moment this feature exists for, so this writes on the way out however the menu is left: launching, stepping into a lobby, or EXIT GAME. BT411 takes the stored name as-is. A callsign here is quoted into frontend.egg, joined into a comma-separated list for the results screen, and published as Steam lobby member data, so a comma alone would split one pilot into two on the score sheet. SanitizeCallsign drops what could end a token early and is applied to what is typed as well as to what is read, so the file cannot hold what the game will not accept. Every index is range-checked on the way in, against the group's real size rather than a constant - the track list is the one that moves, since football and the death race carry different maps, so it answers for whichever scenario is selected. The track is re-checked after the whole file is read as well, because the file is parsed in the order it happens to be written and the scenario may arrive second. Written unconditionally rather than only on a change: it is a few hundred bytes, and writing every time means a value hand-edited out of range comes back corrected instead of being quietly re-rejected on every launch forever. Verified by round trip. A callsign typed and then abandoned via EXIT GAME is in the file and back in the box next launch. A file carrying Ba"d,Na#me loads as BadName; an empty one falls back to Pilot. A full loadout round-trips value for value; vehicle=999 and color=-3 come back 0 with the rest untouched; and track=9 under football falls back to 0 both when the scenario is read first and when it is read second, which is the case the second check exists for. One correction to my own test rig on the way: cross-process SetWindowText on an EDIT updates the cached caption, which an external GetWindowText then reads back happily, while leaving the control's own buffer alone - so the harness looked right and the game correctly saw the old name. WM_SETTEXT is marshalled properly and shows the truth. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
82 lines
1.5 KiB
Plaintext
82 lines
1.5 KiB
Plaintext
# Visual Studio build artifacts
|
|
[Dd]ebug/
|
|
[Rr]elease/
|
|
[Dd]ebug*/
|
|
[Rr]elease*/
|
|
x64/
|
|
x86/
|
|
[Bb]in/
|
|
[Oo]bj/
|
|
ipch/
|
|
*.aps
|
|
*.ncb
|
|
*.opensdf
|
|
*.sdf
|
|
*.suo
|
|
*.user
|
|
*.cachefile
|
|
*.sln.cache
|
|
*.vspscc
|
|
*.vssscc
|
|
*.pch
|
|
*.ilk
|
|
*.tlog
|
|
*.lastbuildstate
|
|
*.idb
|
|
*.pdb
|
|
*.obj
|
|
*.o
|
|
*.exe
|
|
*.dll
|
|
*.exp
|
|
*.map
|
|
|
|
# Visual Studio per-user / IDE state
|
|
.vs/
|
|
*.VC.db
|
|
*.VC.opendb
|
|
|
|
# Runtime / generated output
|
|
*.log
|
|
rpl4.log
|
|
|
|
# Where the game window and the exploded view's panes were last dragged
|
|
# to (RP412MFDLAYOUT). Per-machine by nature - it is screen coordinates
|
|
# on somebody's desk.
|
|
mfd_layout.cfg
|
|
|
|
# The pilot's callsign, remembered between sessions. Whoever is sitting
|
|
# at this machine, which is not the repo's business.
|
|
pilot.cfg
|
|
|
|
# Build-output static libs that land in lib/ (the two committed dependency
|
|
# libs, OpenAL32.lib and libsndfile-1.lib, stay tracked).
|
|
/lib/Munga_L4.lib
|
|
/lib/DivLoader.lib
|
|
|
|
# Stale Subversion metadata
|
|
.svn/
|
|
|
|
# OS cruft
|
|
Thumbs.db
|
|
desktop.ini
|
|
.DS_Store
|
|
|
|
# Packaged runnable game (pack-dist.ps1 output)
|
|
/dist/
|
|
|
|
# Local cockpit-launcher experiments — deliberately untracked
|
|
assets/RP411/startrp-800x600.bat
|
|
assets/RP411/startrp-800x600.ps1
|
|
|
|
# Bundled game working copy: committed wholesale as runtime data (see
|
|
# docs/ASSETS.md). Re-include the binaries the global rules above would skip.
|
|
!assets/**/*.exe
|
|
!assets/**/*.dll
|
|
# ...but never the spool runtime output or Windows thumbnail caches.
|
|
assets/**/*.spl
|
|
assets/**/last.spl
|
|
|
|
# packaged releases (attached to Gitea releases, not tracked)
|
|
RedPlanet-*.zip
|