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 monsters spawn not giving precedence to designated location #33421

Merged

Conversation

ralreegorganon
Copy link
Contributor

Summary

SUMMARY: Bugfixes "Fix monsters spawn not giving precedence to designated location"

Purpose of change

Fixes the issue where monsters were not being placed in their designated locations, but rather a random location within range. Caused by the refactoring in #33244 which unintentionally changed the behavior--previously the game would first attempt to spawn the monster at the requested location, and then fall back to a random location. After the update, it would just pick a random location immediately.

Describe the solution

Reintroduced the logic of first attempting placement in the designated location, and then falling back to a random point, while retaining the improvement in random point selection.

Additional context

Most noticeable with turret spawning in lab surface entry location, which always had their turrets placed at a specific location, but after #33244 were placing them in random locations.

@ralreegorganon ralreegorganon added Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) labels Aug 21, 2019
@ZhilkinSerg ZhilkinSerg merged commit 254e919 into CleverRaven:master Aug 21, 2019
@ralreegorganon ralreegorganon deleted the fix-monster-spawn-location branch April 7, 2020 16:10
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants