Advanced Strategic Command
Static Public Member Functions | List of all members
UnitHooveringLogic Class Reference

#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 More...
static int getEndurance (const VehicleType *veh, int height=-1, int resourceModel=0)

Detailed Description

Definition at line 30 of file vehicle.h.

Member Function Documentation

int UnitHooveringLogic::calcFuelUsage ( const Vehicle veh)
int UnitHooveringLogic::getEndurance ( const Vehicle veh)

calculates the time until the unit crashes because of lack of fuel

time in turns or -1 if the unit can't crash because of missing fuel in its current height

Definition at line 1816 of file vehicle.cpp.

References 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 

The documentation for this class was generated from the following files: