void Room::swapToAlternate() { if((alternate_room != NULL) && active) //If room is active base room { renderer.cleanList(); disable(); //Disable current room alternate_room->disable(); //Paranoid swapPortals(alternate_room); //Update portals to match this room swapItems(alternate_room); //Update items to match this room alternate_room->enable(); //Enable base room } }
void Room::swapToBase() { if((base_room != nullptr) && active) //If room is active alternate room { renderer.cleanList(); disable(); //Disable current room base_room->disable(); //Paranoid swapPortals(base_room); //Update portals to match this room swapItems(base_room); //Update items to match this room base_room->enable(); //Enable original room } }