feat: implement speed-dependent tire pitch scaling and highway joint thumps#114
feat: implement speed-dependent tire pitch scaling and highway joint thumps#114swarup-developer wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e220b2460
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| moved_mi = self.trip.last_moved_mi | ||
| if moved_mi > 0.0: | ||
| moved_m = moved_mi * 1609.344 |
There was a problem hiding this comment.
Use unscaled distance for road-joint timing
At normal gameplay pace this accumulator uses trip.last_moved_mi, but Trip.update computes that value from velocity_mps * dt * effective_time_scale (default 10x, selectable up to 40x), so the new joint thumps are scheduled on compressed route distance rather than the truck's real wheel distance. At 65 mph the intended 14–18 m spacing should sound roughly every half second, but the default pace makes it about 10x faster and fast pace can trigger nearly every frame; use an unscaled physical delta such as t.velocity_mps * dt for this audio/haptic effect.
Useful? React with 👍 / 👎.
What changed and why
What players or maintainers will notice
Tests and checks run
uv run pytest), all 1341 tests pass.uv run ruff check) are completely clean.test_joint_is_low_frequency_only_and_stopsintests/test_rumble.pytest_bass_road_noise_frequency_changes_with_speedintests/test_audio_backends.pytest_road_joint_thumps_accumulate_distance_and_triggerintests/test_driving_features.pyAccessibility impact
Changelog
## UnreleasedinCHANGELOG.md, written in plain player language and matching the style of the existing entries.[skip changelog].