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
netserver_devices.cpp File Reference

Go to the source code of this file.

Functions

void displayUnitInfo (Unit *un, const string callsign, const char *type)
 

Function Documentation

void displayUnitInfo ( Unit un,
const string  callsign,
const char *  type 
)

Definition at line 46 of file zonemgr.cpp.

References UnitUtil::getFactionName(), Unit::getFgSubnumber(), Unit::getFlightgroup(), Unit::getFullname(), Unit::GetSerial(), Flightgroup::name, and Unit::name.

47 {
48  cout<<type;
49  if (!un) {
50  cout<<"\'"<<callsign<<"\' (dead)"<<endl;
51  } else {
52  {
53  char tmp[10];
54  sprintf( tmp, "% 5d ", un->GetSerial() );
55  cout<<tmp;
56  }
57  cout<<UnitUtil::getFactionName( un )<<" "<<un->getFullname()<<" ("<<un->name<<")";
58  Flightgroup *fg = un->getFlightgroup();
59  if (fg) cout<<", \'"<<fg->name<<"\' "<<un->getFgSubnumber();
60  if ( !callsign.empty() && (!fg || callsign != fg->name) )
61  cout<<", callsign \'"<<callsign<<"\'";
62  cout<<endl;
63  }
64 }