Index: code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc
===================================================================
--- code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc	(revision 10934)
+++ code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc	(revision 10935)
@@ -54,5 +54,4 @@
         this->action_ = Action::NONE;
         this->squaredaccuracy_ = 2500;
-        this->bFirstTick_ = true;
         this->bStartedDodging_ = false;
         this->bDefaultPatrol_ = true;
@@ -65,6 +64,4 @@
     {
         SUPER( ActionpointController, XMLPort, xmlelement, mode );
-        // XMLPortEventSink(ActionpointController, BaseObject, "stop", stop, xmlelement, mode);
-        // XMLPortEventSink(ActionpointController, BaseObject, "go", stop, xmlelement, mode);
 
         XMLPortObject(ActionpointController, WorldEntity, "actionpoints", addActionpoint, getActionpoint,  xmlelement, mode);
@@ -72,21 +69,5 @@
         XMLPortParam(ActionpointController, "defaultPatrol", setDefaultPatrol, getDefaultPatrol, xmlelement, mode).defaultValues(true);
     }
-    // void ActionpointController::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
-    // {
-    //     SUPER(ActionpointController, XMLEventPort, xmlelement, mode);
-    //     XMLPortEventSink(ActionpointController, BaseObject, "stop", stop, xmlelement, mode);
-    //     XMLPortEventSink(ActionpointController, BaseObject, "go", stop, xmlelement, mode);
-
-    // }
-    // bool ActionpointController::stop(bool bTriggered, BaseObject* trigger)
-    // {
-    //     this->stop_ = true;
-    //     return true;
-    // }
-    // bool ActionpointController::go(bool bTriggered, BaseObject* trigger)
-    // {
-    //     this->stop_ = false;
-    //     return true;
-    // }
+
     ActionpointController::~ActionpointController()
     {
@@ -95,11 +76,9 @@
         actionpoints_.clear();
         this->actionpointControllerId_ = 0;
-        /*ActionpointController::nextActionpointControllerId_--;
-        if (ActionpointController::nextActionpointControllerId_ < 0)
-            ActionpointController::nextActionpointControllerId_ = 0;*/
+
     }
     void ActionpointController::tick(float dt)
     {
-        if (!this || !this->getControllableEntity() || !this->isActive())
+        if (!this || !this->getControllableEntity() || !this->isActive() || this->stop_)
             return;
         ++this->ticks_;
@@ -126,14 +105,5 @@
             //orxout (internal_error) << "first tick was called by id = " << this->actionpointControllerId_ << ", total = " << ActionpointController::nextActionpointControllerId_ << endl;
         }
-        if (ActionpointController::sTicks_ == 1)
-        {    
-            this->bActionCalled_ = false;
-            
-            this->bFirstTick_ = false;
-        }
-/*        if (ActionpointController::sTicks_ % (ActionpointController::nextActionpointControllerId_+1) != this->actionpointControllerId_)
-        {
-            return;
-        }*/
+
         if (!this || !this->getControllableEntity())
             return;
@@ -151,8 +121,4 @@
         if (!this || !this->getControllableEntity())
             return;
-        
-        if (stop_)
-            return;
-        
 
         if (timeout_ <= 0)
@@ -223,6 +189,5 @@
         if (!this || !this->getControllableEntity())
             return;
-        if (!this->getControllableEntity() || !orxonox_cast<Pawn*> (this->getControllableEntity()))
-            return;
+
         if (this->bDefaultPatrol_ || (this->action_ != Action::FLY && this->action_ != Action::NONE))
         {
@@ -232,9 +197,4 @@
             return;
 
-
-        if (!this || !this->getControllableEntity())
-            return;
-
-        // if (this->actionCounter_ % 2 == 0)
         //No action -> pop one from stack
         if (this->action_ == Action::NONE || this->bTakenOver_)
@@ -247,5 +207,4 @@
             this->executeActionpoint();
             this->bTakenOver_ = false;
-            // this->action();
         }
         if (!this || !this->getControllableEntity())
@@ -262,5 +221,4 @@
                 {
                     this->setAction (Action::FIGHTALL, newTarget);
-                    //this->action();
                 }
                 else
@@ -284,5 +242,4 @@
                 {
                     this->setAction (Action::FIGHT, newTarget);
-                    //this->action();
                 }
                 else
@@ -760,5 +717,5 @@
         }
     }
-    int ActionpointController::nextActionpointControllerId_ = 0;
-    int ActionpointController::sTicks_ = 0;
+    unsigned int ActionpointController::nextActionpointControllerId_ = 0;
+    unsigned int ActionpointController::sTicks_ = 0;
 }   
Index: code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.h
===================================================================
--- code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.h	(revision 10934)
+++ code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.h	(revision 10935)
@@ -170,8 +170,5 @@
             bool getDefaultPatrol ()
                 { return this->bDefaultPatrol_; }
-                 // Trigger interface
-            // bool stop(bool bTriggered, BaseObject* trigger);
-            // bool go(bool bTriggered, BaseObject* trigger);
-            // virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
+               
 
             virtual void stayNearProtect();
@@ -243,25 +240,15 @@
                 void nextActionpoint();                 
             //----[Actionpoint methods]----          
-                bool bFirstTick_; 
-
-              /*  void setSpawners();
-                Vector3 bestHealthPickup (float searchRadius);
-                // Point closestPickup(PickupType::Value pickupType);
-                std::multimap <int, std::pair<PickupSpawner*, bool> > healthSpawners_; 
-                std::multimap <int, std::pair<PickupSpawner*, bool> > damageSpawners_; 
-                std::multimap <int, std::pair<PickupSpawner*, bool> > speedSpawners_; 
-*/
-                bool bActionCalled_;
-                bool bManeuverCalled_;
+
                 bool bDefaultFightAll_;
 
-                bool bActive_;
                 bool bPatrolling_;
                 bool bDefaultPatrol_;
                 bool stop_;
-                static int sTicks_;
-                static int nextActionpointControllerId_;
-                int actionpointControllerId_;
-                int ticks_;
+                static unsigned int sTicks_;     //<! a hack? I don't want action() and maneuver() to be called multiple times in a tick, so I keep
+                                        //<! track of ticks and if current tick is "assigned" to this object, than I call maneuver()/action()
+                static unsigned int nextActionpointControllerId_;    //<! if level has 16 ActionpointControllers, than this variable equals to 17 after first tick 
+                unsigned int actionpointControllerId_;   //<! integer from 0 to nextActionpointControllerId_, different for every ActionpointController in level
+                unsigned int ticks_;     //<! local tick counter
 
 
Index: code/branches/campaignHS15/src/orxonox/controllers/DivisionController.cc
===================================================================
--- code/branches/campaignHS15/src/orxonox/controllers/DivisionController.cc	(revision 10934)
+++ code/branches/campaignHS15/src/orxonox/controllers/DivisionController.cc	(revision 10935)
@@ -43,5 +43,4 @@
         this->myFollower_ = 0;
         this->myWingman_ = 0;
-        //this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&DivisionController::action, this)));
     }
 
@@ -61,5 +60,4 @@
         SUPER(DivisionController, XMLPort, xmlelement, mode);
         
-        //XMLPortParam(DivisionController, "target_", setTarget, getTarget, xmlelement, mode).defaultValues(100.0f);
     }
     void DivisionController::tick(float dt)
@@ -68,14 +66,4 @@
             return;   
         SUPER(DivisionController, tick, dt);
-        /*if (this->timeOffset_ >= 0.0f && this->timeOffset_ <= 0.8f && !this->bActionCalled_)
-        {
-            this->action();
-            this->bActionCalled_ = true;
-        }
-        if (this->timeOffset_ > 1.6f)
-        {
-            this->bActionCalled_ = false;
-        }*/
-
         
     }
Index: code/branches/campaignHS15/src/orxonox/controllers/FightingController.cc
===================================================================
--- code/branches/campaignHS15/src/orxonox/controllers/FightingController.cc	(revision 10934)
+++ code/branches/campaignHS15/src/orxonox/controllers/FightingController.cc	(revision 10935)
@@ -149,5 +149,4 @@
             if (!this || !this->getControllableEntity())
                 return;
-            // if (this->actionCounter_ % 3 == 0)
             if (!this->bDodge_)
             {
@@ -286,13 +285,10 @@
         if (pawn)
             pawn->setAimPosition (this->positionOfTarget_);
-        // if (pawn->getHealth() < 100)
-        //     orxout(internal_error) << "not full, hp = " << pawn->getHealth() << endl;
+
         int firemode;
         float distance = CommonController::distance (this->getControllableEntity(), this->target_);
 
-        // firemode = distance < 1500 ? (distance > 800 && distance < 1200 ? 
-        //                             (this->rocketsLeft_ > 0 && !this->bFiredRocket_ ? getFiremode("RocketFire") : getFiremode ("HsW01"))
-        //                                                      : getFiremode("HsW01")) : 
-        //                                                      (distance < 2500 ? getFiremode("LightningGun") : getFiremode("HsW01"));
+
+       
         if (distance < 1500)
         {
@@ -310,15 +306,6 @@
 
         } 
-        // else if (distance < 1000)
-        // {
-        //     if (this->rocketsLeft_ > 0 && !this->bFiredRocket_)
-        //     {
-        //         firemode = getFiremode ("RocketFire");
-        //     }
-        //     else
-        //     {
-        //         firemode = getFiremode ("HsW01");
-        //     }
-        // }
+    
+
         else if (distance < 2000)
         {
@@ -377,5 +364,4 @@
         }
 
-        //orxout (internal_error) << this->rocketsLeft_ << " rockets left" << endl;
     }
 
Index: code/branches/campaignHS15/src/orxonox/controllers/SectionController.cc
===================================================================
--- code/branches/campaignHS15/src/orxonox/controllers/SectionController.cc	(revision 10934)
+++ code/branches/campaignHS15/src/orxonox/controllers/SectionController.cc	(revision 10935)
@@ -28,9 +28,5 @@
 
 #include "SectionController.h"
-//TODO: formation vectors are wrong, fix it.
-// split classes.
-// weaponsystem.
-//-> Math ?
- 
+
 namespace orxonox
 {
@@ -44,9 +40,7 @@
         this->setFormationMode(FormationMode::FINGER4);
 
-        //this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&SectionController::action, this)));
         this->myWingman_ = 0;
         this->myDivisionLeader_ = 0;
         this->bFirstAction_ = true;
-        //orxout(internal_error) << this << "Was created" << endl;
 
     }
@@ -74,14 +68,5 @@
    
         SUPER(SectionController, tick, dt);
-        /*if (this->timeOffset_ > 0.8f && this->timeOffset_ <= 1.6f && !this->bActionCalled_)
-        {
-            this->action();
-            this->bActionCalled_ = true;
-        }
-        if (this->timeOffset_ > 2.0f)
-        {
-            this->bActionCalled_ = false;
-        }*/
-
+        
     }
 
@@ -137,23 +122,6 @@
                 {
                     this->chooseTarget(); 
-                    //orxout (internal_error) << "Section ain't got no target" << endl;
                 }
-                if (this->hasTarget())
-                {
-                    // this->maneuver();
-                    // this->bShooting_ = this->canFire();
-                    // Vector3 healthPosition = bestHealthPickup((this->target_->getWorldPosition() - this->getControllableEntity()->getWorldPosition()).length());
-                    // if ((this->getControllableEntity()->getWorldPosition() - healthPosition).length() < this->tolerance_)
-                    // {
-                    //     //----choose where to go----
-                    //     this->maneuver();
-                    // }
-                    // else
-                    // {
-                    //     this->dodgeTowards(healthPosition);
-                    // }
-                    // //----fire if you can----
-                    // this->bShooting_ = this->canFire();               
-                }
+
             }
         }
Index: code/branches/campaignHS15/src/orxonox/controllers/SectionController.h
===================================================================
--- code/branches/campaignHS15/src/orxonox/controllers/SectionController.h	(revision 10934)
+++ code/branches/campaignHS15/src/orxonox/controllers/SectionController.h	(revision 10935)
@@ -67,5 +67,4 @@
         private:
             //----private variables-----
-                Timer actionTimer_; //<! Regularly calls action().
                 bool bFirstAction_;
                 
Index: code/branches/campaignHS15/src/orxonox/controllers/WingmanController.cc
===================================================================
--- code/branches/campaignHS15/src/orxonox/controllers/WingmanController.cc	(revision 10934)
+++ code/branches/campaignHS15/src/orxonox/controllers/WingmanController.cc	(revision 10935)
@@ -39,5 +39,4 @@
     {
         RegisterObject(WingmanController);
-        //this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&WingmanController::action, this)));
         this->myLeader_ = 0;
         this->bFirstAction_ = true;
@@ -68,44 +67,4 @@
         
         SUPER(WingmanController, tick, dt);
-        if (!this->myLeader_)
-        {
-            /*if (this->actionTime_ == 2.0f)
-            {
-                if (this->timeOffset_ >= 0.0f && this->timeOffset_ <= 0.8f && !this->bActionCalled_)
-                {
-                    this->action();
-                    this->bActionCalled_ = true;
-                }
-                if (this->timeOffset_ > 1.6f)
-                {
-                    this->bActionCalled_ = false;
-                }
-            }
-            else
-            {
-                if (this->timeOffset_ > 0.8f && this->timeOffset_ <= 1.6f && !this->bActionCalled_)
-                {
-                    this->action();
-                    this->bActionCalled_ = true;
-                }
-                if (this->timeOffset_ > 2.0f)
-                {
-                    this->bActionCalled_ = false;
-                }
-            }*/
-        }
-        else
-        {
-           /* if (this->timeOffset_ >= this->actionTime_ && this->timeOffset_ <= this->actionTime_ + 0.4f && !this->bActionCalled_)
-            {
-                this->action();
-                this->bActionCalled_ = true;
-            }
-            if (this->timeOffset_ <= 0.5f)
-            {
-                this->bActionCalled_ = false;
-            }*/
-        }
-       
 
     }
@@ -157,21 +116,5 @@
                     this->setTarget(this->myLeader_->getTarget());
                 }
-                if (this->hasTarget())
-                {
-                    // this->maneuver();
-                    // this->bShooting_ = this->canFire();
-                    // Vector3 healthPosition = bestHealthPickup((this->target_->getWorldPosition() - this->getControllableEntity()->getWorldPosition()).length());
-                    // if ((this->getControllableEntity()->getWorldPosition() - healthPosition).length() < this->tolerance_)
-                    // {
-                    //     //----choose where to go----
-                    //     this->maneuver();
-                    // }
-                    // else
-                    // {
-                    //     this->dodgeTowards(healthPosition);
-                    // }
-                    // //----fire if you can----
-                    // this->bShooting_ = this->canFire();               
-                }
+                
             }
         }
Index: code/branches/campaignHS15/src/orxonox/controllers/WingmanController.h
===================================================================
--- code/branches/campaignHS15/src/orxonox/controllers/WingmanController.h	(revision 10934)
+++ code/branches/campaignHS15/src/orxonox/controllers/WingmanController.h	(revision 10935)
@@ -68,5 +68,4 @@
             //----private variables-----
                 WeakPtr<ActionpointController> myLeader_;
-                Timer actionTimer_; //<! Regularly calls action().
                 bool bFirstAction_;
                 float actionTime_;
