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

Method validMeleeRange

src/Battlescape/TileEngine.cpp:2581–2584  ·  view source on GitHub ↗

* Validates the melee range between two units. * @param attacker The attacking unit. * @param target The unit we want to attack. * @param dir Direction to check. * @return True when the range is valid. */

Source from the content-addressed store, hash-verified

2579 * @return True when the range is valid.
2580 */
2581bool TileEngine::validMeleeRange(BattleUnit *attacker, BattleUnit *target, int dir)
2582{
2583 return validMeleeRange(attacker->getPosition(), dir, attacker, target, 0);
2584}
2585
2586/**
2587 * Validates the melee range between a tile and a unit.

Callers 6

selectNearestTargetMethod · 0.80
selectPointNearTargetMethod · 0.80
meleeActionMethod · 0.80
initMethod · 0.80
postPathProceduresMethod · 0.80

Calls 10

hasNoFloorMethod · 0.80
PositionClass · 0.70
getPositionMethod · 0.45
getSizeMethod · 0.45
getArmorMethod · 0.45
getTileMethod · 0.45
getTerrainLevelMethod · 0.45
getUnitMethod · 0.45
getHeightMethod · 0.45
getFloatHeightMethod · 0.45

Tested by

no test coverage detected