Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve player vehicle exit logic #726

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

seeseemelk
Copy link

The player can now no longer accelerate whilst exiting a vehicle.
This prevents Claude from floating next to the vehicle if the player accelerates during the exit animation.
At the same time, this behaviour is closer to the exit vehicle behaviour in the actual game.

The player can now no longer accelerate whilst exiting a vehicle.
This prevents Claude from floating next to the vehicle if the
player accelerates during the exit animation.
// The player cannot accelerate while exiting.
// He can, however, brake in the opposite direction of movement.
int velocitySign = vehicle->getVelocity() >= 0 ? 1 : -1;
int movementSign = movement.x >= 0 ? 1 : -1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and lines below have some tab characters, indent with spaces only.

@seeseemelk
Copy link
Author

I replaced those tab character

@codecov
Copy link

codecov bot commented Oct 27, 2019

Codecov Report

Merging #726 into master will decrease coverage by 6.98%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #726      +/-   ##
==========================================
- Coverage   18.12%   11.14%   -6.99%     
==========================================
  Files         252      252              
  Lines       22938    22946       +8     
  Branches     5769     5794      +25     
==========================================
- Hits         4158     2557    -1601     
- Misses      17659    18860    +1201     
- Partials     1121     1529     +408
Impacted Files Coverage Δ
rwengine/src/ai/CharacterController.cpp 2.87% <ø> (-4.87%) ⬇️
rwgame/states/IngameState.cpp 0% <0%> (ø) ⬆️
rwengine/src/objects/VehicleObject.cpp 2.6% <0%> (-8.87%) ⬇️
rwengine/src/loaders/LoaderCutsceneDAT.cpp 6.55% <0%> (-40.99%) ⬇️
tests/test_FileIndex.cpp 40.81% <0%> (-38.78%) ⬇️
rwcore/platform/FileIndex.cpp 12.04% <0%> (-38.56%) ⬇️
rwengine/src/loaders/LoaderIPL.cpp 53.68% <0%> (-32.64%) ⬇️
rwengine/src/loaders/LoaderIDE.cpp 35.75% <0%> (-30.06%) ⬇️
tests/test_Text.cpp 65.55% <0%> (-30%) ⬇️
tests/test_LoaderDFF.cpp 59.45% <0%> (-29.73%) ⬇️
... and 89 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51b7264...db1c405. Read the comment docs.

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.

2 participants