move identity check up a bit to avoid useless work

develop
myk002 2021-01-24 08:57:56 -08:00
parent 03719f58df
commit 32a0363f31
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 2 additions and 2 deletions

@ -881,11 +881,11 @@ static void linkRooms(df::building *bld)
for (size_t i = 0; i < vec.size(); i++)
{
auto room = vec[i];
if (!room->is_room || room->z != bld->z)
if (!room->is_room || room->z != bld->z || room == bld)
continue;
df::building_extents_type *pext = getExtentTile(room->room, df::coord2d(bld->x1, bld->y1));
if (!pext || !*pext || room == bld)
if (!pext || !*pext)
continue;
changed = true;