If there isn't any room to place a respawning monster in, then rather than letting it vanish, keep it on the list of pending-respawns and hope that space clears up later. Also, if a side with pending-respawns is about to loose because it has 0 active members, then make room to place a respawn.
SNZWIH62TOCEMLLS4FWGPC4NNH7VLHKFO5LW3XCFBB5JTSLJGUOQC if (idx == -1 && fac.active_members == 0&& mgrd(pos) != NON_MONSTER){// We have no members left, so to prevent the round// from ending attempt to displace whatever is in// our position.int midx = mgrd(pos);monsters* other = &menv[midx];if (to_respawn[midx] == -1){// The other monster isn't a respawner itself, so// just get rid of it.mprf(MSGCH_DIAGNOSTICS,"Dismissing non-repsawner %s to make room ""respawner whose side has 0 active members.",other->name(DESC_PLAIN, true).c_str());monster_die(other, KILL_DISMISSED, NON_MONSTER);}else{// Other monster is a respawner, try to move it.mprf(MSGCH_DIAGNOSTICS,"Teleporting respawner %s to make room ""other respawner whose side has 0 active members.",other->name(DESC_PLAIN, true).c_str());monster_teleport(other, true);}