| 121 | } |
| 122 | |
| 123 | static bool IsLizardActiveNearby(const ItemInfo& item, bool isInitializing = false) |
| 124 | { |
| 125 | for (auto& currentEntity : g_Level.Items) |
| 126 | { |
| 127 | // Check if the entity is a lizard. |
| 128 | if (currentEntity.ObjectNumber != ID_LIZARD) |
| 129 | continue; |
| 130 | |
| 131 | // Check if the entity is in the same room as Puna. |
| 132 | if (currentEntity.RoomNumber != item.RoomNumber) |
| 133 | continue; |
| 134 | |
| 135 | // If the entity is currently initializing, return early. |
| 136 | if (isInitializing) |
| 137 | return true; |
| 138 | |
| 139 | // Check status of entity. |
| 140 | if (currentEntity.HitPoints > 0 && |
| 141 | currentEntity.Status == ITEM_INVISIBLE && |
| 142 | !(currentEntity.Flags & IFLAG_KILLED)) |
| 143 | { |
| 144 | return true; |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | return false; |
| 149 | } |
| 150 | |
| 151 | static void SpawnSummonSmoke(const Vector3& pos) |
| 152 | { |
no outgoing calls
no test coverage detected