#include <vehicle.h>
Static Public Member Functions | |
| static int | calcFuelUsage (const Vehicle *veh) |
| static int | getEndurance (const Vehicle *veh) |
| calculates the time until the unit crashes because of lack of fuel | |
| static int | getEndurance (const VehicleType *veh, int height=-1, int resourceModel=0) |
Definition at line 30 of file vehicle.h.
| int UnitHooveringLogic::calcFuelUsage | ( | const Vehicle * | veh | ) | [static] |
Definition at line 1646 of file vehicle.cpp.
References chhochfliegend, chtieffliegend, VehicleType::fuelConsumption, ContainerBase::getMap(), Vehicle::getMovement(), Vehicle::height, Vehicle::maxMovement(), maxwindspeed, minmalq, Vehicle::typ, GameMap::weather, and GameMap::Weather::windSpeed.
Referenced by GameMap::endTurn(), and getEndurance().
| int UnitHooveringLogic::getEndurance | ( | const Vehicle * | veh | ) | [static] |
calculates the time until the unit crashes because of lack of fuel
Definition at line 1681 of file vehicle.cpp.
References calcFuelUsage(), chhochfliegend, chtieffliegend, Resources::fuel, VehicleType::fuelConsumption, ContainerBase::getCarrier(), Vehicle::getTank(), Vehicle::height, Vehicle::maxMovement(), minmalq, and Vehicle::typ.
Referenced by checkUnitsForCrash(), DashboardPanel::showUnitData(), and showUnitEndurance().
| int UnitHooveringLogic::getEndurance | ( | const VehicleType * | veh, | |
| int | height = -1, |
|||
| int | resourceModel = 0 | |||
| ) | [static] |
Definition at line 1658 of file vehicle.cpp.
References chfliegend, chhochfliegend, chtieffliegend, Resources::fuel, VehicleType::fuelConsumption, ContainerBaseType::getStorageCapacity(), ContainerBaseType::height, max(), minmalq, and VehicleType::movement.
1.5.1