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

Make map::add_spawn() accept a tripoint instead of a point #36608

Merged

Conversation

kevingranade
Copy link
Member

Summary

SUMMARY: Bugfixes "Fix monsters spawning on the player's level when intended for other levels."

Purpose of change

Fixes #36346
Spawn points placed by fields would sometimes appear on the player's level instead of the level the field was on. Specifically this affected tears in reality. From examining the code it looks like this could occur elsewhere as well, such as when an animal live birth occurred underground.

Describe the solution

Make map::add_spawn() accept a tripoint instead of a point, and update all of it's callers to supply an appropriate tripoint.

Testing

Locate an underground area with open ground over it, and ideally an upper building level that matches.
Place a tear in reality in various locations, place yourself above or below it, and wait for monsters to appear.
Monsters should appear on the level with the field, not the level with the player.

@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) Spawn Creatures, items, vehicles, locations appearing on map Monsters Monsters both friendly and unfriendly. labels Jan 1, 2020
@ZhilkinSerg ZhilkinSerg merged commit 9eb7975 into CleverRaven:master Jan 1, 2020
fengjixuchui added a commit to fengjixuchui/Cataclysm-DDA that referenced this pull request Jan 1, 2020
Merge pull request CleverRaven#36608 from kevingranade/fix-3D-monster…
@kevingranade kevingranade deleted the fix-3D-monster-spawning branch June 28, 2020 21:16
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` Monsters Monsters both friendly and unfriendly. Spawn Creatures, items, vehicles, locations appearing on map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Craters spawning and z level
2 participants