| 654 | } |
| 655 | |
| 656 | void RoomPortalWave::restoreInitialEntityState() |
| 657 | { |
| 658 | // We need to use seats with vision before calling Room::restoreInitialEntityState |
| 659 | // because it will empty the list |
| 660 | if(mPortalObject == nullptr) |
| 661 | { |
| 662 | OD_LOG_ERR("RoomPortalWave=" + getName()); |
| 663 | return; |
| 664 | } |
| 665 | |
| 666 | Tile* tilePortalObject = mPortalObject->getPositionTile(); |
| 667 | if(tilePortalObject == nullptr) |
| 668 | { |
| 669 | OD_LOG_ERR("RoomPortalWave=" + getName() + ", mPortalObject=" + mPortalObject->getName()); |
| 670 | return; |
| 671 | } |
| 672 | TileData* tileData = mTileData[tilePortalObject]; |
| 673 | if(tileData == nullptr) |
| 674 | { |
| 675 | OD_LOG_ERR("RoomPortalWave=" + getName() + ", tile=" + Tile::displayAsString(tilePortalObject)); |
| 676 | return; |
| 677 | } |
| 678 | |
| 679 | if(!tileData->mSeatsVision.empty()) |
| 680 | mPortalObject->notifySeatsWithVision(tileData->mSeatsVision); |
| 681 | |
| 682 | // If there are no covered tile, the temple object is not working |
| 683 | if(numCoveredTiles() == 0) |
| 684 | mPortalObject->notifyRemoveAsked(); |
| 685 | |
| 686 | Room::restoreInitialEntityState(); |
| 687 | } |
| 688 | |
| 689 | void RoomPortalWave::addRoomPortalWaveData(RoomPortalWaveData* roomPortalWaveData) |
| 690 | { |
nothing calls this directly
no test coverage detected