Skip to content

Commit

Permalink
Remove text floaters after moving to another map or elevation
Browse files Browse the repository at this point in the history
Fixes #401
  • Loading branch information
alexbatalov committed Jan 21, 2025
1 parent 95d92d8 commit 2e14e46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/map.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,9 @@ int mapHandleTransition()
} else {
if (!isInCombat()) {
if (gMapTransition.map != gMapHeader.field_34 || gElevation == gMapTransition.elevation) {
// SFALL: Remove text floaters after moving to another map.
textObjectsReset();

mapLoadById(gMapTransition.map);
}

Expand Down
3 changes: 3 additions & 0 deletions src/object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,9 @@ int objectSetLocation(Object* obj, int tile, int elevation, Rect* rect)
}

if (elevation != oldElevation) {
// SFALL: Remove text floaters after moving to another elevation.
textObjectsReset();

mapSetElevation(elevation);
tileSetCenter(tile, TILE_SET_CENTER_REFRESH_WINDOW | TILE_SET_CENTER_FLAG_IGNORE_SCROLL_RESTRICTIONS);
if (isInCombat()) {
Expand Down

0 comments on commit 2e14e46

Please sign in to comment.