UnitHooveringLogic Class Reference

#include <vehicle.h>

List of all members.

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)


Detailed Description

Definition at line 30 of file vehicle.h.


Member Function Documentation

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

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

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.


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:48:01 2012 for Advanced Strategic Command by  doxygen 1.5.1