MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / GetRangeWithModifiers

Method GetRangeWithModifiers

src/Ext/WeaponType/Body.cpp:236–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236int WeaponTypeExt::GetRangeWithModifiers(WeaponTypeClass* pThis, TechnoClass* pFirer)
237{
238 int range = 0;
239
240 if (!pThis && !pFirer)
241 return range;
242 else if (pFirer && pFirer->CanOccupyFire())
243 range = RulesClass::Instance->OccupyWeaponRange * Unsorted::LeptonsPerCell;
244 else if (pThis && pFirer)
245 range = pThis->Range;
246 else
247 return range;
248
249 if (range == -512)
250 return range;
251
252 return WeaponTypeExt::GetRangeWithModifiers(pThis, pFirer, range);
253}
254
255int WeaponTypeExt::GetRangeWithModifiers(WeaponTypeClass* pThis, TechnoClass* pFirer, int range)
256{

Callers

nothing calls this directly

Calls 6

GetTechnoTypeMethod · 0.80
ContainsMethod · 0.80
FindMethod · 0.45
IsActiveMethod · 0.45
GetTypeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected