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

Boats push creatures in water out of the way #30519

Merged
merged 2 commits into from
May 15, 2019

Conversation

mlangsdorf
Copy link
Contributor

Summary

SUMMARY: Features "Boats push creatures in water out of the way"

Purpose of change

One of the gating factors for adding Boats to mainline is the issue where boats on deep water will collide with invisible fishes, wrecking the boat's hull.

Change that so the fish get pushed out of the way.

Describe the solution

when a vehicle part collides with a creature while the creature is on a water tile, displace the creature 2 tiles on a 45 degree angle away from the vehicle's direction of movement until the creature is no longer colliding with the vehicle and the creature is not in the same tile as any other creature.

Also, make sure that non-friendly monsters that end up riding in a vehicle can still move around.

Describe alternatives you've considered

It may be necessary to use a variant of get_points() that returns the vehicle's future points, not current points.

Additional context

About to run into a flock of ducks at 20 mph:
BraceForImpact

Ducks get displaced without damaging the vehicle:
NotTooBad

when a vehicle part collides with a creature while the creature is
on a water tile, displace the creature 2 tiles on a 45 degree
angle away from the vehicle's direction of movement until the
creature is no longer colliding with the vehicle and the creature
is not in the same tile as any other creature.
Only friendly monsters passive ride in vehicles.  Hostile
monsters will continue moving around the vehicle.
@mlangsdorf mlangsdorf added <Enhancement / Feature> New features, or enhancements on existing Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` labels May 14, 2019
@Night-Pryanik
Copy link
Contributor

While pushing most fish is ok (even the ones like perch weighing 40 kilograms (though I personally think that's a bug that need to be fixed)), jawed terror is a notable example of monster whose weight must be taken into account, I think.

@Zireael07
Copy link
Contributor

How much does the jawed terror weight? An average modern boat is on the order of a ton, if not two.

@kevingranade kevingranade merged commit b68b6ca into CleverRaven:master May 15, 2019
@mlangsdorf mlangsdorf deleted the boat_push_fish branch May 15, 2019 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants