Skip to content

Hygiene sweep: dead code, stale config, unread flags - #178

Merged
rollingrock merged 3 commits into
mainfrom
chore/hygiene-sweep-169
Oct 14, 2026
Merged

rollingrock merged 3 commits into
mainfrom
chore/hygiene-sweep-169

Conversation

@rollingrock

@rollingrock rollingrock commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Closes #169. Dead code, stale config and unread flags, plus two repo tidy-ups. Three items change behaviour on purpose; they are marked below.

What

  • FRIK-038 setScale now does what its comment and the shipped INI say: fVrScale is applied to the game only when it is true. It was read and then ignored, so fVrScale was always applied. The shipped INI already has setScale = true, and the code default is now true to match, so only a player who set it to false sees a change. Behaviour change.
  • FRIK-042 A left-handed player whose weapon has no left-handed offsets gets the right-handed ones instead of none, so switching handedness no longer reads as every weapon losing its position. Behaviour change.
  • FRIK-040 Physical Pip-Boy button haptics fire on the hand that touches the Pip-Boy, which is the left hand in the right-arm configuration. Behaviour change for left-handed Pip-Boy users.
  • FRIK-045 The geometry hide pass re-shows only the geometries FRIK hid, instead of every geometry in the array, so another mod's hidden geometry stays hidden.
  • FRIK-036, 053, 046 Dead code removed: the commented-out gun reload feature (src/reload/ and its hooks), the unused renderer and patch-offset helpers in GameHooks.cpp, and the "shouldn't be here!" log line in smooth movement. The src/reload/ row leaves the subsystem map in CLAUDE.md / AGENTS.md.
  • README: ROCK added to the compatibility list (grip and carry are API v2.3, the scope lens placement v2.4).
  • .gitignore: the build_output_*.txt variants the build writes, and four per-machine leftovers (openvr/, changelog.txt, frik.list.txt, .codex/).

No change needed:

  • FRIK-006 Nothing in the config UI changes PlayerHeight or hideHead, so there is nothing to save. The load/save asymmetry is revisited with calibration.
  • FRIK-041 _pipboyEnabled is honoured inside Pipboy::onFrameUpdate (since the subsystem-disable API in 6f0e609). It returns early after the flashlight and the power-armor fix-up, which must keep running while the Pip-Boy is disabled. Gating the whole Pip-Boy update in the frame flow, as the issue suggested, would have turned the flashlight off with it.

Testing

Release build is clean with no warnings, and ctest passes all 71 test cases (FRIK's and the framework's), built against the pinned framework submodule as CI does.

In-game checks for this PR: setScale = false leaves the game's fVrScale:VR alone (FRIK.log says so); a left-handed player sees right-handed weapon offsets where no left-handed ones are saved; left-handed Pip-Boy buttons buzz the touching hand; a geometry hidden by another mod stays hidden.

In game (2026-10-13, all five open PRs merged into one build, headset sitting)

  • FRIK-038: setScale = false (as a session override) left the game's fVrScale:VR alone; true applied it.
  • FRIK-040: a right-hand press on the left-arm Pip-Boy logged and buzzed. The left-handed case could not be tried: with the game switched to left-handed mode live, the (holo) Pip-Boy stayed on the left arm.
  • FRIK-042: in left-handed mode the Alien Blaster, which ships right-handed offsets only, logged HasWeaponOffset:true. But it was held upside down, which led to the fix below.
  • Perf: FRIK's frame averaged 0.135 ms (p99 0.20 ms) over 60 s.

Fix after the sitting: bf1e3a2

The fallback applied the right-handed transform to the left hand unchanged. Every shipped right/left weapon pair differs by a half turn about the barrel and a flipped z: as is, the 32 pairs are 180 degrees off their left entry; mirrored, the median is 1.4 degrees.

The fallback is now that mirror, for the weapon offset only. The hand-pose (primHand) pairs have no such relation, so they keep falling back to none, as before.

Rebased onto main after #177, #179 and #180. The build is clean and all 73 test cases pass.

Still to do: an in-game look at a left-handed Alien Blaster.

@rollingrock
rollingrock force-pushed the chore/hygiene-sweep-169 branch from 5909e90 to bf1e3a2 Compare October 13, 2026 22:27
setScale now does what its comment and the shipped INI say: fVrScale is applied to the game only
when the flag is true. The flag was read nowhere, so it was always applied; the member's initialiser
is true now too, matching the INI read default and data/config/FRIK.ini.

A left-handed player whose weapon has no left-handed offsets gets the right-handed ones instead of
none, so switching handedness no longer reads as every weapon losing its position.

Physical Pip-Boy button haptics fire on the hand that touches the Pip-Boy, which is the left hand in
the right-arm configuration.

The geometry hide pass re-shows only the geometries FRIK hid, instead of every geometry in the array,
so another mod's hidden geometry stays hidden.

Dead code removed: the commented-out gun reload feature, the unused renderer and patch-offset helpers
in the hooks, and a stray log line in smooth movement. The subsystem-map row for src/reload/ goes with
it, in CLAUDE.md and its AGENTS.md twin, and the migration record that names those files as
deliberately preserved now says it describes the migration rather than the current tree.
…iles

The compatibility list named True Scopes, BetterScopesVR, Fallout London VR and Immersive Flashlight
VR but not ROCK, although 0.79 and 0.79.1 both shipped API work specifically for it. The grip and
carry entries it uses are v2.3 and the lens placement is v2.4, so the row names both rather than
crediting the whole integration to one.

.gitignore covered build_output.txt but not the _release and _tests variants the build actually
writes, and four per-machine leftovers showed as untracked in every status: a stray openvr_api.lib
(the build uses the framework's vendored SDK and never references this one), an old hand-written
changelog.txt and frik.list.txt, and a .codex config directory. A clean status is what makes an
accidental 'git add -A' harmless.
… instead of using it as is

Found in game: a left-handed Alien Blaster, which ships right-handed offsets only, was held upside down.
The fallback added earlier in this branch applied the right-handed transform to the left hand unchanged.
Every shipped right/left weapon pair differs by a half turn about the barrel and a flipped z: as is, the
32 pairs are 180 degrees off their left entry; mirrored, the median is 1.4 degrees.

The fallback is now that mirror, and for the weapon offset only. The hand-pose modes (primHand) have no
such relation between their pairs - neither as is nor mirrored comes close - so they keep falling back
to none, as before this branch.
@rollingrock
rollingrock force-pushed the chore/hygiene-sweep-169 branch from bf1e3a2 to 354a145 Compare October 14, 2026 13:41
@rollingrock
rollingrock merged commit 09b9c15 into main Oct 14, 2026
4 checks passed
@rollingrock
rollingrock deleted the chore/hygiene-sweep-169 branch October 14, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hygiene sweep: dead code, stale config, unread flags [FRIK-006, 036, 038, 040, 041, 042, 045, 046, 053]

1 participant