Index: branches/playability.merge/src/world_entities/space_ships/space_ship.h
===================================================================
--- branches/playability.merge/src/world_entities/space_ships/space_ship.h	(revision 10365)
+++ branches/playability.merge/src/world_entities/space_ships/space_ship.h	(revision 10366)
@@ -2,4 +2,7 @@
  * @file space_ship.h
  * Implements the Control of a Spaceship
+ * Space Ships are the core class for all types of ships in Orxonox
+ * By default is on OM_GROUP_00
+ * If player boards the ship, it is moved to OM_GROUP_01
  */
 
@@ -16,4 +19,6 @@
 class ParticleEmitter;
 class ParticleSystem;
+class Trail;
+class Wobblegrid;
 
 class SpaceShip : public Playable
@@ -29,4 +34,11 @@
 
     virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f);
+    /*
+    void setTravelHeight(float travelHeight);
+    void setTravelDistance(const Vector2D& distance);
+    void setTravelDistance(float x, float y);
+    */
+
+    //void setAirFriction(float friction) { this->airFriction = friction; };
 
     virtual void enter();
@@ -41,25 +53,111 @@
     virtual void respawn();
 
-    virtual void collidesWith(WorldEntity* entity, const Vector& location);
+    inline Vector getVelocity() { return this->velocity; };
+
     virtual void tick(float time);
     virtual void draw() const;
 
     virtual void process(const Event &event);
+//    virtual void hit (WorldEntity* entity, float damage);
+
+    inline WeaponManager& getWeaponManagerSecondary() { return this->secWeaponMan; };
+
+    //Functions for GUI
+    inline float getShieldCur() { return this->shieldCur; };        //!< returns current shield value
+    inline float getShieldMax() { return this->shieldMax; };        //!< returns maximum shield value
+
+    inline float getArmorCur() { return this->armorCur; };          //!< returns current armor value
+    inline float getArmorMax() { return this->armorMax; };          //!< returns current armor value
+
+    inline float getElectronicCur() { return this->electronicCur; }; //!< returns current electronic value
+    inline float getElectronicMax() { return this->electronicMax; }; //!< returns current electronic value
+
+    inline PNode* getTravelNode() { return this->travelNode; };
+
+    //damage handler
+    virtual void damage(float pDamage, float eDamage);  //!< pDamage physical damage, eDamage electronic damage
+
+    //included by Michel: 
+    virtual void enterPlaymode(Playable::Playmode playmode);
+    void setPlaymodeXML(const std::string& playmode); //recieves the playmode from a string (useful for script implementation)
+    void setActionWidthPercentage(int i);
+    void updateTravelDistance();
+    virtual void movement (float dt);
+
+    //
+
+    void nextWeaponConfig();
+    void previousWeaponConfig();
+
+    virtual void hit(float damage, WorldEntity* killer);
 
   private:
     void init();
 
-    void calculateVelocity(float time);
-
-    bool                  bUp;                //!< up button pressed.
-    bool                  bDown;              //!< down button pressed.
+    //void calculateVelocity(float time);
+
+    void regen(float time);  //!< handler for shield and electronic regeneration
+
+    void weaponRegen(float time);   //!< weapon energy regeneration
+
+    inline bool systemFailure() {  return (this->electronicCur < float(rand())/float(RAND_MAX) * this->electronicTH); };
+
+    void updateElectronicWidget();
+    void updateShieldWidget();
+
+    //WeaponManager         weaponMan;      //!< the primary weapon manager: managing a list of energy weapons to wepaon-slot mapping
+    WeaponManager         secWeaponMan;       //!< the secondary weapon manager: managing a list of special weapons to weapon-slot mapping
+    short                 supportedPlaymodes; //!< What Playmodes are Supported in this Playable.
+    Playable::Playmode    playmode;           //!< The current playmode.
+
+    //ship atributes
+    float       shieldCur;          //!< current shield
+    float       shieldMax;          //!< maximum shield
+    float       shieldEnergyShare;  //!< percentage of reactor output
+    float       shieldRegen;        //!< shield regeneration rate per second
+    float       shieldTH;           //!< shield threshhold for reactivation
+    bool        shieldActive;       //!< wheather the shield is working
+    OrxGui::GLGuiEnergyWidgetVertical* shieldWidget; //!< holds the widget that shows the shield bar
+
+    float       armorCur;           //!< current armor
+    float       armorMax;           //!< maximum armor
+    float       armorRegen;         //!< armor regeneration per tick (usable on bioships?)
+    //note that the armor widget is set on the health- widget in world- entity (see in player.cc)
+
+    float       electronicCur;      //!< current electronic
+    float       electronicMax;      //!< maximum electronic
+    float       electronicRegen;    //!< electronic regenration rate per tick
+    float       electronicTH;       //!< Threshhold for electronic failure
+    OrxGui::GLGuiEnergyWidgetVertical* electronicWidget; //!< holds the widget that shows the electronic bar
+
+    float       engineSpeedCur;     //!< speed output for movement = speed base + energy share part
+    float       engineSpeedBase;    //!< speed base
+    int         enginePowerConsume; //!< energy needed
+    float       engineEnergyShare;  //!< percentage of reactor output
+
+    int         weaponEnergySlot;   //!< number of energy weapon slots
+    int         weaponEnergyUsed;
+    float       weaponEnergyShare;
+    float       weaponEnergyRegen;
+    int         weaponSpecialSlot;  //!< number of special weapon slots
+    int         weaponSpecialUsed;
+
+    float       reactorOutput;      //!< reactor output 
+    float       reactorCapacity;    //!< reactor capacity
+
+    int         curWeaponPrimary;   //!< current primary weapon config 
+    int         curWeaponSecondary; //!< current secondary weapon config
+
+    bool                  bForward;                //!< up button pressed.
+    bool                  bBackward;              //!< down button pressed.
     bool                  bLeft;              //!< left button pressed.
     bool                  bRight;             //!< right button pressed.
     bool                  bAscend;            //!< ascend button pressed.
     bool                  bDescend;           //!< descend button presses.
-//    bool                  bFire;              //!< fire button pressed.(moved to playable)
     bool                  bRollL;             //!< rolling button pressed (left)
     bool                  bRollR;             //!< rolling button pressed (right)
-
+    bool                  bSecFire;           //!< second fire button pressed
+
+    /*
     float                 xMouse;             //!< mouse moved in x-Direction
     float                 yMouse;             //!< mouse moved in y-Direction
@@ -68,8 +166,29 @@
     int                   controlVelocityX;
     int                   controlVelocityY;
-//    float                 cycle;              //!< hovercycle
+    */
 
     Vector                velocity;           //!< the velocity of the player.
-    Vector                oldVelocity;        //!< the velocity the player had last synced
+    Vector                oldPos;
+
+// 2D-traveling
+    PNode*                travelNode;
+    float                 travelSpeed;        //!< the current speed of the Ship (to make soft movement)
+    Vector                travelVelocity;     //!< object internal velocity vector for relative movement to the track node
+    Vector2D              travelDistancePlus;     //!< Travel-Distance away from the TravelNode
+    Vector2D              travelDistanceMinus;
+    bool                  isTravelDistanceInit;
+
+    float                 actionWidthPercentage;
+
+// Camera
+    PNode                 cameraNode;
+    float                 cameraLook;
+    float                 rotation;
+    float                 cameraSpeed;
+
+    void                  setCameraDistance(float dist);
+    void                  setCameraFovy(float fovy);
+
+    /*
     Quaternion            mouseDir;           //!< the direction where the player wants to fly
     Quaternion            oldMouseDir;        //!< the direction where the player wanted to fly
@@ -77,13 +196,19 @@
     Quaternion            rotQuat;
     Quaternion            pitchDir;
-    float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
-    float                 acceleration;       //!< the acceleration of the player.
-
-    float                 airViscosity;
+    float                 dogdeSpeed;        //!< the dogde Speed of the ship.
+    */
+
+    //Quaternion            direction;          //!< the direction of the ship.
+    float                 acceleration;       //!< the acceleration of the ship.
+    //float                 airFriction;        //!< AirFriction.
+    //float                 airViscosity;
 
     byte                  oldMask;            //!< used for synchronisation
 
-    ParticleEmitter*      burstEmitter;
-    ParticleSystem*       burstSystem;
+    Trail*                trail;              //!< Burst trail
+    Trail*                trailL;              //!< Burst trail
+    Trail*                trailR;              //!< Burst trail
+
+
 };
 
