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

game: don't drench the player if the player is in a boat #40026

Merged
merged 1 commit into from
Apr 30, 2020

Conversation

mlangsdorf
Copy link
Contributor

@mlangsdorf mlangsdorf commented Apr 30, 2020

Summary

SUMMARY: Bugfixes "game: don't drench the player if the player is in a boat"

Purpose of change

Players in boats and amphibious vehicles get drenched for moving through water, even though being in a boat should hopefully keep their clothing dry.

Describe the solution

In game::place_player(), add a check for the player being in a vehicle that can float before calling drench().

Describe alternatives you've considered

place_player() is an awful function and needs to be refactored, and this particular part should probably be moved into the suffer() function.

Testing

Spawned a canoe and took it for a spin without getting soaked. Getting out of the boat into deep water drenched the character instantly.

In game::place_player(), add a check for the player being in a
vehicle that can float before calling drench().
@mlangsdorf mlangsdorf added <Bugfix> This is a fix for a bug (or closes open issue) Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Vehicles Vehicles, parts, mechanics & interactions labels Apr 30, 2020
@kevingranade
Copy link
Member

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/walking-on-boat-hulls-or-around-a-boat-type-vehicle-gives-wet-debuff-and-plays-water-splash-sound-effect/23433/7

@Night-Pryanik
Copy link
Contributor

Would player be drenched if he's sailing in a boat while it's raining?

@ZhilkinSerg ZhilkinSerg merged commit 70c9d8b into CleverRaven:master Apr 30, 2020
@ZhilkinSerg
Copy link
Contributor

Would player be drenched if he's sailing in a boat while it's raining?

Yeah - it is done in a different part of the code - do_rain and wet_player in weather.cpp.

@mlangsdorf
Copy link
Contributor Author

This only prevents the drenching that occurs when the player is on a SWIMMABLE tile, so drenching from rain should still occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants