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_util_server.cpp
Go to the documentation of this file.
1 #include <string>
2 #include "unit_generic.h"
3 #include "configxml.h"
4 #include "unit_util.h"
5 #include "vs_globals.h"
6 using std::string;
7 
8 namespace UnitUtil
9 {
10 void switchFg( Unit *my_unit, string arg )
11 {
12  if (!my_unit) return;
13  string type = my_unit->name;
14  int nr_waves_left = 0;
15  int nr_ships = 1;
16  string order( "default" );
17  Flightgroup *fg = my_unit->getFlightgroup();
18  if (fg) {
19  type = fg->type;
20  nr_waves_left = fg->nr_waves_left;
21  nr_ships = 1;
22  fg->Decrement( my_unit );
23  order = fg->ainame;
24  }
26  my_unit->faction ), order, nr_ships, nr_waves_left, "", "", mission );
27  my_unit->SetFg( fg, fg->nr_ships_left-1 );
28 }
29 int communicateTo( Unit *my_unit, Unit *other_unit, float mood )
30 {
31  return 0;
32 }
33 bool commAnimation( Unit *my_unit, string anim )
34 {
35  return false;
36 }
37 }
38