Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Unit::Computer Class Reference

#include <unit_generic.h>

Classes

class  RADARLIM
 

Public Member Functions

float max_speed () const
 
float max_ab_speed () const
 
 Computer ()
 

Public Attributes

class Unit::Computer::RADARLIM radar
 
bool ecmactive
 
Vector NavPoint
 
UnitContainer target
 
UnitContainer threat
 
UnitContainer velocity_ref
 
bool force_velocity_ref
 
float threatlevel
 
float set_speed
 
float max_combat_speed
 
float max_combat_ab_speed
 
float max_yaw_left
 
float max_yaw_right
 
float max_pitch_down
 
float max_pitch_up
 
float max_roll_left
 
float max_roll_right
 
unsigned char slide_start
 
unsigned char slide_end
 
bool itts
 
bool combat_mode
 

Detailed Description

The computer holds all data in the navigation computer of the current unit It is outside modifyable with GetComputerData() and holds only volatile Information inside containers so that destruction of containers will not result in segfaults. Maximum speeds and turning restrictions are merely facts of the computer and have nothing to do with the limitations of the physical nature of space combat

Definition at line 569 of file unit_generic.h.

Constructor & Destructor Documentation

Unit::Computer::Computer ( )
inline

Definition at line 665 of file unit_generic.h.

665  : NavPoint( 0, 0, 0 )
666  , threatlevel( 0 )
667  , set_speed( 0 )
668  , max_combat_speed( 0 )
669  , max_combat_ab_speed( 0 )
670  , max_yaw_left( 0 )
671  , max_yaw_right( 0 )
672  , max_pitch_down( 0 )
673  , max_pitch_up( 0 )
674  , max_roll_left( 0 )
675  , max_roll_right( 0 )
676  , slide_start( 0 )
677  , slide_end( 0 )
678  , itts( false )
679  , combat_mode( false ) {}

Member Function Documentation

float Unit::Computer::max_ab_speed ( ) const

Definition at line 3323 of file unit_generic.cpp.

References VegaConfig::getVariable(), XMLSupport::parse_float(), and vs_config.

Referenced by FlyByWire::Afterburn(), BarrelRoll(), EvadeWavy(), Orders::MoveToParent::Execute(), UnitUtil::maxAfterburnerSpeed(), and showUnitStats().

3324 {
3325  static float combat_mode_mult = XMLSupport::parse_float( vs_config->getVariable( "physics", "combat_speed_boost", "100" ) );
3326  //same capped big speed as combat...else different
3327  return (!combat_mode) ? combat_mode_mult*max_combat_speed : max_combat_ab_speed;
3328 }

Member Data Documentation

bool Unit::Computer::combat_mode
bool Unit::Computer::ecmactive
bool Unit::Computer::force_velocity_ref

Definition at line 642 of file unit_generic.h.

Vector Unit::Computer::NavPoint

Definition at line 635 of file unit_generic.h.

Referenced by VDU::Draw(), and Unit::Init().

unsigned char Unit::Computer::slide_end
unsigned char Unit::Computer::slide_start
UnitContainer Unit::Computer::target
UnitContainer Unit::Computer::threat

Definition at line 639 of file unit_generic.h.

Referenced by Unit::Init(), and GameCockpit::LookupUnitStat().

float Unit::Computer::threatlevel
UnitContainer Unit::Computer::velocity_ref

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