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
flightgroup_server.cpp
Go to the documentation of this file.
1 #include "mission.h"
2 #include "flightgroup.h"
3 #include "cmd/unit_generic.h"
4 #include <stdio.h>
5 
6 Flightgroup* Flightgroup::newFlightgroup( const std::string &name,
7  const std::string &type,
8  const std::string &faction,
9  const std::string &order,
10  int num_ships,
11  int num_waves,
12  const std::string &logo_tex,
13  const std::string &logo_alp,
14  Mission *mis )
15 {
16  Flightgroup *fg = mis->findFlightgroup( name, faction );
17  Flightgroup *fgtmp = fg;
18  if (fg == NULL)
19  fg = new Flightgroup;
20  fg->Init( fgtmp, name, type, faction, order, num_ships, num_waves, mis );
21  if ( !logo_tex.empty() ) {
22  if ( logo_alp.empty() )
23  fg->squadLogoStr = logo_tex;
24  else
25  fg->squadLogoStr = logo_alp;
26  }
27  return fg;
28 }
29 
31 {
32  printf( "warning: Flightgroup::operator= may *really* not work properly.\n"
33  "In fact, this shouldn't be called at all anyway!\n" );
34  return other;
35 }
36 
38