MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getMuzzleLocation

Method getMuzzleLocation

game/state/city/vehicle.cpp:2023–2030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2021bool Vehicle::isDead() const { return health <= 0; }
2022
2023Vec3<float> Vehicle::getMuzzleLocation() const
2024{
2025 return type->isGround()
2026 ? Vec3<float>(position.x, position.y, position.z + (float)type->height / 16.0f)
2027 : Vec3<float>(position.x, position.y,
2028 position.z - tileObject->getVoxelOffset().z +
2029 (float)type->height / 16.0f);
2030}
2031
2032void Vehicle::update(GameState &state, unsigned int ticks)
2033{

Callers 3

fireMethod · 0.45
fireMethod · 0.45
canFireMethod · 0.45

Calls 2

isGroundMethod · 0.80
getVoxelOffsetMethod · 0.45

Tested by

no test coverage detected