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

Fix for temperature related: chargen crash (in labs) and ice lab food decay bug #24555

Merged
merged 2 commits into from
Aug 1, 2018
Merged

Conversation

nexusmrsep
Copy link
Contributor

Partial fix for #24547 (segfaults)
Resolves #24288 (proper fix - hopefully)
Resolves #24205

Hopefully I got this right this time.
Problems are related to temperature calculations that were using map variable, that did not exist on character generation. Luckily I found that game has bool new_game that can be used to determine if 'g->m' is valid and can be safely called for it's variables. So while new_game == true temperature calculations can simply turn a blind eye to map temperatures overlay for a brief moment before the true play starts. This should simultaneously resolve problems with segfaults at chargen and safely introduce queries for g->m.temperature to properly extract and use local temperature overlays like one used in ice_lab.

I have compiled and tested this by trying different chargens and new games, and also tested if food decays properly on 1-st level of ice lab (in compare to outside surroundings) and everything if fine (have it mind that it only partially fixes #24547 ), but @ZhilkinSerg I have a humble request - please test this, because my previous attempts were not successful, and I want to be 200% sure this works. Thanks in advance.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) labels Jul 30, 2018
@nexusmrsep nexusmrsep closed this Jul 30, 2018
@nexusmrsep nexusmrsep reopened this Jul 30, 2018
@ZhilkinSerg ZhilkinSerg merged commit 91beecc into CleverRaven:master Aug 1, 2018
@nexusmrsep
Copy link
Contributor Author

I figure that it worked as expected?

@nexusmrsep nexusmrsep deleted the ice_lab branch August 1, 2018 15:11
@ZhilkinSerg
Copy link
Contributor

I figure that it worked as expected?

Yes, no crashes now.

@nexusmrsep
Copy link
Contributor Author

Yes, no crashes now.

Thank you kindly for testing.

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) [C++] Changes (can be) made in C++. Previously named `Code`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ballooning log file and numerous crashes segfault on creating character Food rotting in ice labs
2 participants