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

Method deactivate

source/traps/Trap.cpp:264–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264void Trap::deactivate(Tile* tile)
265{
266 if (tile == nullptr)
267 return;
268
269 TrapTileData* trapTileData = static_cast<TrapTileData*>(mTileData[tile]);
270 trapTileData->setActivated(false);
271
272 BuildingObject* entity = getBuildingObjectFromTile(tile);
273 if (entity == nullptr)
274 return;
275
276 entity->setMeshOpacity(0.5f);
277}
278
279bool Trap::isActivated(Tile* tile) const
280{

Callers

nothing calls this directly

Calls 2

setActivatedMethod · 0.80
setMeshOpacityMethod · 0.80

Tested by

no test coverage detected