Index: code/branches/particles2/src/orxonox/Scene.cc
===================================================================
--- code/branches/particles2/src/orxonox/Scene.cc	(revision 6082)
+++ code/branches/particles2/src/orxonox/Scene.cc	(revision 6087)
@@ -334,8 +334,6 @@
     {
         // get the WorldEntity pointers
-        WorldEntity* object0 = static_cast<WorldEntity*>(colObj0->getUserPointer());
-        assert(orxonox_cast<WorldEntity*>(object0));
-        WorldEntity* object1 = static_cast<WorldEntity*>(colObj1->getUserPointer());
-        assert(orxonox_cast<WorldEntity*>(object1));
+        SmartPtr<WorldEntity> object0 = static_cast<WorldEntity*>(colObj0->getUserPointer());
+        SmartPtr<WorldEntity> object1 = static_cast<WorldEntity*>(colObj1->getUserPointer());
 
         // false means that bullet will assume we didn't modify the contact
Index: code/branches/particles2/src/orxonox/controllers/AIController.cc
===================================================================
--- code/branches/particles2/src/orxonox/controllers/AIController.cc	(revision 6082)
+++ code/branches/particles2/src/orxonox/controllers/AIController.cc	(revision 6087)
@@ -109,5 +109,5 @@
 
         if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0f))
-            this->getControllableEntity()->fire(0);
+//             this->getControllableEntity()->fire(0);
 
         SUPER(AIController, tick, dt);
Index: code/branches/particles2/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/branches/particles2/src/orxonox/infos/PlayerInfo.cc	(revision 6082)
+++ code/branches/particles2/src/orxonox/infos/PlayerInfo.cc	(revision 6087)
@@ -50,5 +50,7 @@
         this->controller_ = 0;
         this->controllableEntity_ = 0;
-        this->controllableEntityID_ = CLIENTID_UNKNOWN;
+        this->controllableEntityID_ = OBJECTID_UNKNOWN;
+        this->temporaryControllableEntity_ = 0;
+        this->temporaryControllableEntityID_ = OBJECTID_UNKNOWN;
 
         this->gtinfo_ = 0;
@@ -80,4 +82,5 @@
         registerVariable(this->name_,                 VariableDirection::ToClient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));
         registerVariable(this->controllableEntityID_, VariableDirection::ToClient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
+        registerVariable(this->temporaryControllableEntityID_, VariableDirection::ToClient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
         registerVariable(this->bReadyToSpawn_,        VariableDirection::ToServer);
         registerVariable(this->gtinfoID_,             VariableDirection::ToClient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedgtinfoID));
@@ -166,14 +169,11 @@
     void PlayerInfo::startTemporaryControl(ControllableEntity* entity)
     {
-        if (!entity || entity == this->controllableEntity_)
-            return;
-
-//         if (this->controllableEntity_)
-//             this->stopControl();
-
-        this->oldControllableEntity_ = this->controllableEntity_;
-
-        this->controllableEntity_ = entity;
-        this->controllableEntityID_ = entity->getObjectID();
+        if (!entity)
+            return;
+        
+        assert( this->temporaryControllableEntity_==0 );
+
+        this->temporaryControllableEntity_ = entity;
+        this->temporaryControllableEntityID_ = entity->getObjectID();
 
         entity->setPlayer(this);
@@ -201,10 +201,4 @@
 
         entity->removePlayer();
-        
-        if ( this->oldControllableEntity_ )
-        {
-            this->oldControllableEntity_->removePlayer();
-            this->oldControllableEntity_ = 0;
-        }
 
         this->changedControllableEntity();
@@ -213,13 +207,13 @@
     void PlayerInfo::stopTemporaryControl()
     {
-        ControllableEntity* entity = this->controllableEntity_;
+        ControllableEntity* entity = this->temporaryControllableEntity_;
 
         if (!entity)
             return;
 
-        this->controllableEntity_ = this->oldControllableEntity_.get();
-        this->controllableEntityID_ = this->controllableEntity_->getObjectID();
-
-        if (this->controller_)
+        this->temporaryControllableEntity_ = 0;
+        this->temporaryControllableEntityID_ = OBJECTID_UNKNOWN;
+
+        if ( this->controllableEntity_ && this->controller_)
             this->controller_->setControllableEntity(this->controllableEntity_);
 
@@ -228,5 +222,5 @@
         this->changedControllableEntity();
     }
-
+    
     void PlayerInfo::networkcallback_changedcontrollableentityID()
     {
@@ -243,6 +237,23 @@
     }
 
+    void PlayerInfo::networkcallback_changedtemporarycontrollableentityID()
+    {
+        CCOUT(0) << "changedtemporarycontrollableentityid" << endl;
+        if (this->temporaryControllableEntityID_ != OBJECTID_UNKNOWN)
+        {
+            Synchronisable* temp = Synchronisable::getSynchronisable(this->temporaryControllableEntityID_);
+            ControllableEntity* entity = orxonox_cast<ControllableEntity*>(temp);
+            this->startTemporaryControl(entity);
+        }
+        else
+        {
+            this->stopTemporaryControl();
+        }
+    }
+
+
     void PlayerInfo::networkcallback_changedgtinfoID()
     {
+        CCOUT(0) << "changedcontrollableentityid" << endl;
         if (this->gtinfoID_ != OBJECTID_UNKNOWN)
         {
Index: code/branches/particles2/src/orxonox/infos/PlayerInfo.h
===================================================================
--- code/branches/particles2/src/orxonox/infos/PlayerInfo.h	(revision 6082)
+++ code/branches/particles2/src/orxonox/infos/PlayerInfo.h	(revision 6087)
@@ -92,4 +92,5 @@
         private:
             void networkcallback_changedcontrollableentityID();
+            void networkcallback_changedtemporarycontrollableentityID();
             void networkcallback_changedgtinfoID();
             void updateGametypeInfo();
@@ -98,6 +99,7 @@
             Controller* controller_;
             ControllableEntity* controllableEntity_;
-            WeakPtr<ControllableEntity> oldControllableEntity_;
+            ControllableEntity* temporaryControllableEntity_;
             unsigned int controllableEntityID_;
+            unsigned int temporaryControllableEntityID_;
 
             const GametypeInfo* gtinfo_;
