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
building_generic.cpp
Go to the documentation of this file.
1 #include "building_generic.h"
2 
4  bool vehicle,
5  const char *filename,
6  bool SubUnit,
7  int faction,
8  const string &modifications,
9  Flightgroup *fg ) : Unit( filename, SubUnit, faction, modifications, fg )
10 {
11  this->vehicle = vehicle;
12  continuous = true;
13  this->parent.plane = NULL;
14 }
15 
17  bool vehicle,
18  const char *filename,
19  bool SubUnit,
20  int faction,
21  const string &modifications,
22  Flightgroup *fg ) : Unit( filename, SubUnit, faction, modifications, fg )
23 {
24  this->vehicle = vehicle;
25  continuous = false;
26  this->parent.terrain = NULL;
27 }
28 
29 /********** IGNORE BUILDINGS ON SERVER SIDE FOR NOW *********/
30 /*
31  * Vector p,q,r;
32  * GetOrientation (p,q,r);
33  * if (vehicle) {
34  * Normalize(p);
35  * // float k = p.Dot (q);
36  * Vector tmp1;
37  * #if 0
38  * if (k<=0) {
39  * tmp1 = Vector (0,0,1);
40  * if (k=tmp1.Magnitude()){
41  * tmp1*=800./k;
42  * }
43  * } else
44  * #endif
45  * {
46  * tmp1 = 200*q.Cross (p);
47  * }
48  * NetLocalTorque+=((tmp1-tmp1*(tmp1.Dot (GetAngularVelocity())/tmp1.Dot(tmp1))))*1./GetMass();
49  * }
50  */
51 //tmp is unknow since I can't include planetary_transform yet
52 //SetCurPosition (tmp);
53 //}
54