MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / notifyActiveSpotCreated

Method notifyActiveSpotCreated

source/traps/Trap.cpp:226–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226BuildingObject* Trap::notifyActiveSpotCreated(Tile* tile)
227{
228 TrapEntity* trapEntity = getTrapEntity(tile);
229 if(trapEntity == nullptr)
230 return nullptr;
231
232 TrapTileData* trapTileData = static_cast<TrapTileData*>(mTileData[tile]);
233 trapTileData->setTrapEntity(trapEntity);
234 trapTileData->fireSeatsSawTriggering();
235
236 for(Seat* seat : trapTileData->mSeatsVision)
237 seat->setVisibleBuildingOnTile(this, tile);
238
239 return trapEntity;
240}
241
242void Trap::notifyActiveSpotRemoved(Tile* tile)
243{

Callers

nothing calls this directly

Calls 3

setTrapEntityMethod · 0.80

Tested by

no test coverage detected