-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix shivering mechanism #60991
Closed
Closed
Fix shivering mechanism #60991
Conversation
This file contains 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
Fris0uman
reviewed
Sep 15, 2022
Maybe make it so you still get a message about shivering with the same condition as before but it only wakes you up if it's really cold (and you're not dead tired)? |
I'm busy recently and don't want to work on this PR. If anyone want to fix the issue I would happy to see that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
astyled
astyled PR, label is assigned by github actions
BasicBuildPassed
This PR builds correctly, label assigned by github actions
<Bugfix>
This is a fix for a bug (or closes open issue)
[C++]
Changes (can be) made in C++. Previously named `Code`
json-styled
JSON lint passed, label assigned by github actions
Mechanics: Character / Player
Character / Player mechanics
Mechanics: Temperature
Freezing, cooling, thawing, heating, etc. mechanics
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
Bugfixes "Fix shivering mechanism"
Purpose of change
Fix #47671
Fix #53443
While being cold could prevent you from sleep in real life, It is unclear if the warmth in @ window is enough to prevent shivering and leads to confusion.
Also you can fall asleep while being too cold if you are tired enough in real life.
Describe the solution
Lowering the threshold to let player could sleep in spring.
Also make player able to sleep if they are deadly tire to prevent extreme sleep deprivation.
Describe alternatives you've considered
Make body temperature more accurate. (see #58961)
Remove this mechanism as we have another being too cold wakes you up mechanism at player_hardcoded_effects.cpp
Testing
Test 1:
Create a character spawn in spring
Being naked
Set fatigue to tired
Being able to sleep without waking up
Test 2:
The same as above but in winter
Wake up due to cold after falling asleep
Test 3:
The same as test 2 but being exhausted
Ignore warnings and keep trying to sleep
Wake up from cold because the code in player_hardcoded_effects.cpp
Try sleep again and die because of too cold
Additional context
Some comments in update_bodytemp.cpp are incorrect. I updated them in this PR too.
I don't see #53411 happening so if someone checked it doesn't happen anymore that issue could be closed.