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 not being spawned on the map #36691

Merged

Conversation

ZhilkinSerg
Copy link
Contributor

@ZhilkinSerg ZhilkinSerg commented Jan 4, 2020

Summary

SUMMARY: None

Purpose of change

Fixes #36690

Describe the solution

  1. Fix logical expression to spawn monster on empty tiles (it was set to non-empty previously)
    2. Move some checks on top of the function to bail out early when possible (should increase performance a bit).

Describe alternatives you've considered

Play in a monster-free world!

Testing

Start a new game (or visit new overmap terrain tiles) and see that new monster are being spawned again.

@ZhilkinSerg ZhilkinSerg added (P2 - High) High priority (for ex. important bugfixes) Spawn Creatures, items, vehicles, locations appearing on map [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. <Bugfix> This is a fix for a bug (or closes open issue) labels Jan 4, 2020
@ZhilkinSerg ZhilkinSerg requested a review from BevapDin January 4, 2020 11:58
@ZhilkinSerg
Copy link
Contributor Author

On second thought it is possible that we will use (or already are using) this function to spawn monsters on a different non-game map, so I should not move these checks out of their place.

@BevapDin BevapDin merged commit 1e7f02e into CleverRaven:master Jan 4, 2020
@ZhilkinSerg ZhilkinSerg deleted the fix-monster-spawn-2020-01-04 branch January 4, 2020 15:45
@Stephen2
Copy link
Contributor

Stephen2 commented Jan 4, 2020

Thank you! I wondered what the hell was going on 😁 😁

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. (P2 - High) High priority (for ex. important bugfixes) Spawn Creatures, items, vehicles, locations appearing on map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Monsters don't spawn in 10113 and later
3 participants