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

Function GetLizardItemNumber

TombEngine/Objects/TR3/Entity/PunaBoss.cpp:108–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 }
107
108 static int GetLizardItemNumber(const ItemInfo& item)
109 {
110 if (!item.TestFlags((int)BossItemFlags::Object, (short)BossFlagValue::Lizard))
111 return NO_VALUE;
112
113 auto lizardList = GetLizardEntityList(item);
114 if (lizardList.empty())
115 return NO_VALUE;
116
117 if (lizardList.size() == 1)
118 return lizardList[0];
119 else
120 return lizardList[Random::GenerateInt(0, (int)lizardList.size() - 1)];
121 }
122
123 static bool IsLizardActiveNearby(const ItemInfo& item, bool isInitializing = false)
124 {

Callers 1

PunaControlFunction · 0.85

Calls 5

GetLizardEntityListFunction · 0.85
GenerateIntFunction · 0.85
TestFlagsMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected