MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / IsBoxInCooldown

Function IsBoxInCooldown

TombEngine/Game/control/box.cpp:598–610  ·  view source on GitHub ↗

* @brief Checks if a pathfinding box is bad and currently in cooldown. * * @param lot Pointer to the creature's LOT (pathfinding state). * @param boxNumber Pathfinding box to check. * @return true if the box is in cooldown, false otherwise. */

Source from the content-addressed store, hash-verified

596 * @return true if the box is in cooldown, false otherwise.
597 */
598static bool IsBoxInCooldown(const LOTInfo* LOT, int boxNumber)
599{
600 if (boxNumber == NO_VALUE)
601 return false;
602
603 for (const auto& badBox : LOT->BadBoxes)
604 {
605 if (badBox.BoxNumber == boxNumber && badBox.Count < 0)
606 return true;
607 }
608
609 return false;
610}
611
612/**
613 * @brief Updates the creature's bad box memory.

Callers 1

CanExpandToBoxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected