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 bug in Map::placeCreature when using extended positions #4270

Merged
merged 2 commits into from
Dec 14, 2022

Conversation

Mkalo
Copy link
Contributor

@Mkalo Mkalo commented Dec 14, 2022

Pull Request Prelude

Changes Proposed

The shuffle done in here:

forgottenserver/src/map.cpp

Lines 211 to 214 in 6c3c327

if (extendedPos) {
std::shuffle(relList.begin(), relList.begin() + 4, getRandomGenerator());
std::shuffle(relList.begin() + 4, relList.end(), getRandomGenerator());
} else {

Prioritizes the first 4 relative positions of the extendedRelList vector, and this worked properly before the changes in this commit that changed the order of the items in the vector: 214d432#diff-742a716324b97c7b673cb41a50625f5583e55761b4cd8bacaaadf2b2480d0050L170

src/map.cpp Outdated Show resolved Hide resolved
Co-authored-by: Cezar Guimarães <cezar.guimaraes@outlook.com>
Copy link
Member

@ranisalt ranisalt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn we missed you

@EPuncker EPuncker merged commit c274252 into otland:master Dec 14, 2022
EPuncker pushed a commit to EPuncker/forgottenserver that referenced this pull request May 23, 2023
)

Co-authored-by: Cezar Guimarães <cezar.guimaraes@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants