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 game freeze when player cannot contain mission reward #47287

Merged
merged 1 commit into from
Feb 7, 2021

Conversation

BrettDong
Copy link
Member

@BrettDong BrettDong commented Feb 7, 2021

Summary

Bugfixes "Fix game freeze when player cannot contain mission reward"

Purpose of change

Fix #47282 : The game stuck in an infinite loop trying to add the mission reward item to the player's inventory when the player cannot contain it.

Describe the solution

Swap the order of two statements in item_pocket::handle_liquid_or_spill.

Describe alternatives you've considered

A band-aid fix, see BrettDong@29e4c2b: Add a check can_stash. If the player cannot stash the reward item, then place it on the ground instead. This avoids the infinite loop.

Testing

Load the save in #47282 and the game does not freeze.

@BrettDong BrettDong added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Missions Quests and missions labels Feb 7, 2021
src/npctalk.cpp Outdated Show resolved Hide resolved
@BrettDong BrettDong force-pushed the mission branch 2 times, most recently from 4ff3643 to 29e4c2b Compare February 7, 2021 03:44
@BrettDong BrettDong marked this pull request as draft February 7, 2021 03:51
@BrettDong

This comment has been minimized.

@BrettDong BrettDong marked this pull request as ready for review February 7, 2021 04:05
@BrettDong BrettDong requested a review from KorGgenT February 7, 2021 04:35
@ZhilkinSerg ZhilkinSerg merged commit f026a67 into CleverRaven:master Feb 7, 2021
@BrettDong BrettDong deleted the mission branch February 8, 2021 16:51
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` Missions Quests and missions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The recently added mission from the new island prison crashes the game at success
3 participants