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 segfault on certain scenarios #30122

Merged
merged 2 commits into from
Apr 30, 2019

Conversation

Hirmuolio
Copy link
Contributor

@Hirmuolio Hirmuolio commented Apr 30, 2019

Summary

SUMMARY: Bugfixes "Fix segfault on scenarios that start near toilets/vending machines"

Purpose of change

Fixes: #30119

Describe the solution

Toilets and vending machines add their items during mapgen. When the item is placed the game tries to get the heat from heat sources when it tries to set the temperature for the items. But that causes the game to crash.

If the last temp check was before calendar::start do not look at the heat radiation or convection (heat from sources such as fires). Just assume both to be at 0.

They both are 0 usually anyways. There are not many fires present before pleyer plays the game.

Describe alternatives you've considered

Additional context

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Map / Mapgen Overmap, Mapgen, Map extras, Map display Mechanics: Temperature Freezing, cooling, thawing, heating, etc. mechanics labels Apr 30, 2019
@ZhilkinSerg ZhilkinSerg merged commit 94bf388 into CleverRaven:master Apr 30, 2019
@Hirmuolio Hirmuolio deleted the Hirmuolio-toilet-segfault branch May 1, 2019 14:11
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` Map / Mapgen Overmap, Mapgen, Map extras, Map display Mechanics: Temperature Freezing, cooling, thawing, heating, etc. mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating a new game will cause the game to crash
2 participants