OSDN Git Service

[Fix] #39748 必要な時に階層保存処理に回らないミスを修正. / Fixed a mistake that does not go to the floor...
[hengband/hengband.git] / src / floor-save.c
index 307fe80..2fd1719 100644 (file)
@@ -923,7 +923,7 @@ void leave_floor(player_type *creature_ptr)
        }
 
        /* Extract current floor info or NULL */
-       sf_ptr = get_sf_ptr(tmp_floor_idx);
+       sf_ptr = get_sf_ptr(creature_ptr->floor_id);
 
        /* Choose random stairs */
        if ((creature_ptr->change_floor_mode & CFM_RAND_CONNECT) && tmp_floor_idx)
@@ -1013,7 +1013,7 @@ void leave_floor(player_type *creature_ptr)
        }
 
        /* No current floor -- Left/Enter dungeon etc... */
-       if (!tmp_floor_idx)
+       if (!creature_ptr->floor_id)
        {
                /* No longer need to save current floor */
                return;