Repository navigation
fix(fp): the camera stays above the road, boats keep off bridges, left click punches - #21
Merged
Merged
Conversation
…t click punches The chase camera could drop under the road: looking up from low down behind the car (the orbit pitch pushed all the way) lowered the eye with nothing to hold it above the ground. It now stays CAM_RADIUS above the ground under it, the water surface off the land and beside a bridge deck. Photo mode's free flight had no floor at all, so flying down went straight through the street; it now stops TpsRig.GROUND_CLEAR above the ground, like the third-person camera. Boats sailed through bridges and so seemed to sail on the road: CityLife treated every water tile as open water, bridge tiles included. Boats now keep to open water (water with no road on it), turn back where a bridge stands ahead of them (one built after they set out), and float with their waterline at the water surface instead of 2 cm above it. Left click used to shove whoever stood in front, the arms-out push that read as hands up, unless the guard was held. It now throws the jab and cross combo straight away, the body turning to whoever the swing goes for or else to where the camera looks. The shove moves to R (the act_shove input), and the guard on right click is the fighting stance (fists up, camera in closer). The pause menu's key list, the README, the architecture notes, the player slice and the actions flag description follow. Tests: fp_actions_test throws the combo without the guard, shoves on R and checks the bindings; fp_drive_test looks up from low down behind the car and stays above the road; fp_player_test flies down in photo mode and stops at the ground; the new fp_boats_test sails a grown city's boats past its bridges for 300 s and checks they never cross one, float at the surface, keep moving and turn back at a bridge ahead. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Automated reviewNo new findings on the 18 changed files (gdlint, complexity, TODO policy, dead code). Run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three of the reported street bugs: the camera could go below the roads, ships sailed on the roads over the water, and left click did a "hands up" shove instead of a punch.
What changes in the game
Rshoves. Holding right click raises the guard, the fighting stance (fists up, the camera in closer). The pause menu's key list says so.Implementation
scripts/fp/drive/drive_feature.gd:camera_xformlifts the chase eye toCAM_RADIUSabove_ground_below(eye)(the collision ground,WATER_Ywhere there is none).scripts/fp/player/player.gd:_photo_flyclamps the flight toTpsRig.GROUND_CLEARabove the ground (WATER_Yoff the land).scripts/world/city_life.gd:_open_water(i)(water with no road on it) builds the boats' water tiles and neighbours;_update_boatsturns a boat back (from and to swapped,tmirrored) when the tile ahead is a bridge; boats ride atWS.WATER_Y±BOB(their model origin is the waterline).scripts/fp/actions/actions_feature.gd:strike(what := "punch")takes"punch"(the combo) or"shove", a queued press keeps which; every swing faces its target, else the camera's yaw. New inputact_shove(R) inINPUTS.project.godotgains only theact_shoveblock.scripts/fp/ui/pause_menu.gd: Click Punch, Right-click Guard, R Shove.Tests
fp_boats_test(new, 9 checks): a grown city with a river and bridges; 300 s of boats never on a bridge, at the water surface, still moving; a boat headed into a bridge turns back where it is and gets no closer.fp_actions_test: the punch without the guard, the combo, the shove on R throughstrike("shove"), the R binding.fp_drive_test:_check_camera(above the car, and looking up from low down it stays above the road).fp_player_test: photo flight down stops 0.20 m above the ground.Docs
README (player controls, city life),
docs/fp/ARCHITECTURE.md(inputs, A, E, driving and body actions rows),docs/fp/slices/A-player.md(photo mode spec and test), theactionsflag description indata/feature_flags.json, regenerated API docs.Validation
GRIDFALL_OFFLINE=1 GATE_RETRIES=1 tools/gate.sh full: PASS (42 steps: import, parse, 38 unit tests, the orbit and first-person smokes), no retries.After the gate only the
actionsflag description changed;tools/gate.sh quick --only fp_ops_test(it checks every flag has a description) passed again.pre-commit run --all-filesandpython tools/checks/run_all.py: PASS, no new findings.