-
-
Notifications
You must be signed in to change notification settings - Fork 375
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 swap of the main tile addon if a top object already exists in that tile #8936
Fix swap of the main tile addon if a top object already exists in that tile #8936
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Districh-ru , I left one comment here. Could you please take a look when you have time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (1/1)
Hi, @Branikolog, this bug also happens for the maps made by the original editor and we should fix it, but in a new PR IMHO. Because it is not Editor and new map format related but game engine related. :) |
Hi @Branikolog , this is the same issue as #8505 as it is not related to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. No more issues found then. :)
@Districh-ru , thank you so much for this fix! |
The objects order on the same tile is determined by the current main addon object type (checked by
getObjectTypeByIcn()
function) and the layer type of the new tile being placed.This PR fixes the
getObjectTypeByIcn()
function that was giving object type only for the main tile and givingOBJ_NONE
for all other tiles. Now the function checks all object tiles.It also forbids main addon swap if a new tile is the background layer one and the current tile already has an object with ID.
Master build:
fheroes2.2024-07-07.21-48-34-430.mp4
This PR:
fheroes2.2024-07-07.21-49-19-194.mp4