MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / setDiscovered

Method setDiscovered

src/Savegame/Tile.cpp:369–385  ·  view source on GitHub ↗

* Sets the tile's cache flag. - TODO: set this for each object separately? * @param flag true/false * @param part 0-2 westwall/northwall/content+floor */

Source from the content-addressed store, hash-verified

367 * @param part 0-2 westwall/northwall/content+floor
368 */
369void Tile::setDiscovered(bool flag, int part)
370{
371 if (_discovered[part] != flag)
372 {
373 _discovered[part] = flag;
374 if (part == 2 && flag == true)
375 {
376 _discovered[0] = true;
377 _discovered[1] = true;
378 }
379 // if light on tile changes, units and objects on it change light too
380 if (_unit != 0)
381 {
382 _unit->setCache(0);
383 }
384 }
385}
386
387/**
388 * Get the black fog of war state of this tile.

Callers 8

setDebugModeMethod · 0.45
resetTilesMethod · 0.45
nextStageMethod · 0.45
runMethod · 0.45
loadMAPMethod · 0.45
calculateFOVMethod · 0.45
time10MinutesMethod · 0.45
time1MonthMethod · 0.45

Calls 1

setCacheMethod · 0.80

Tested by

no test coverage detected