Index: code/branches/presentation/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/branches/presentation/src/orxonox/gametypes/Gametype.cc	(revision 8631)
+++ code/branches/presentation/src/orxonox/gametypes/Gametype.cc	(revision 8637)
@@ -58,5 +58,5 @@
 
         this->defaultControllableEntity_ = Class(Spectator);
-
+        
         this->bAutoStart_ = false;
         this->bForceSpawn_ = false;
@@ -121,10 +121,19 @@
         }
 
-        if (this->gtinfo_->bStartCountdownRunning_ && !this->gtinfo_->bStarted_)
-            this->gtinfo_->startCountdown_ -= dt;
-
-        if (!this->gtinfo_->bStarted_)
+        if (this->gtinfo_->isStartCountdownRunning() && !this->gtinfo_->hasStarted())
+            this->gtinfo_->countdownStartCountdown(dt);
+
+        if (!this->gtinfo_->hasStarted())
+        {
+            for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+            {
+                // Inform the GametypeInfo that the player is ready to spawn.
+                if(it->first->isHumanPlayer() && it->first->isReadyToSpawn())
+                    this->gtinfo_->playerReadyToSpawn(it->first);
+            }
+                    
             this->checkStart();
-        else if (!this->gtinfo_->bEnded_)
+        }
+        else if (!this->gtinfo_->hasEnded())
             this->spawnDeadPlayersIfRequested();
 
@@ -136,5 +145,5 @@
         this->addBots(this->numberOfBots_);
 
-        this->gtinfo_->bStarted_ = true;
+        this->gtinfo_->start();
 
         this->spawnPlayersIfRequested();
@@ -143,5 +152,5 @@
     void Gametype::end()
     {
-        this->gtinfo_->bEnded_ = true;
+        this->gtinfo_->end();
 
         for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
@@ -173,4 +182,5 @@
     {
         this->players_[player].state_ = PlayerState::Joined;
+        this->gtinfo_->playerEntered(player);
     }
 
@@ -269,4 +279,7 @@
                     }
                 }
+
+                if(victim->getPlayer()->isHumanPlayer())
+                    this->gtinfo_->pawnKilled(victim->getPlayer());
 
                 ControllableEntity* entity = this->defaultControllableEntity_.fabricate(victim->getCreator());
@@ -345,5 +358,5 @@
                 it->second.state_ = PlayerState::Dead;
 
-                if (!it->first->isReadyToSpawn() || !this->gtinfo_->bStarted_)
+                if (!it->first->isReadyToSpawn() || !this->gtinfo_->hasStarted())
                 {
                     this->spawnPlayerAsDefaultPawn(it->first);
@@ -356,12 +369,12 @@
     void Gametype::checkStart()
     {
-        if (!this->gtinfo_->bStarted_)
-        {
-            if (this->gtinfo_->bStartCountdownRunning_)
-            {
-                if (this->gtinfo_->startCountdown_ <= 0)
-                {
-                    this->gtinfo_->bStartCountdownRunning_ = false;
-                    this->gtinfo_->startCountdown_ = 0;
+        if (!this->gtinfo_->hasStarted())
+        {
+            if (this->gtinfo_->isStartCountdownRunning())
+            {
+                if (this->gtinfo_->getStartCountdown() <= 0.0f)
+                {
+                    this->gtinfo_->stopStartCountdown();
+                    this->gtinfo_->setStartCountdown(0.0f);;
                     this->start();
                 }
@@ -388,8 +401,8 @@
                         // If in developer's mode, there is no start countdown.
                         if(Core::getInstance().inDevMode())
-                            this->gtinfo_->startCountdown_ = 0;
+                            this->start();
                         else
-                            this->gtinfo_->startCountdown_ = this->initialStartCountdown_;
-                        this->gtinfo_->bStartCountdownRunning_ = true;
+                            this->gtinfo_->setStartCountdown(this->initialStartCountdown_);
+                        this->gtinfo_->startStartCountdown();
                     }
                 }
@@ -401,6 +414,8 @@
     {
         for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+        {
             if (it->first->isReadyToSpawn() || this->bForceSpawn_)
                 this->spawnPlayer(it->first);
+        }
     }
 
@@ -421,4 +436,8 @@
             player->startControl(spawnpoint->spawn());
             this->players_[player].state_ = PlayerState::Alive;
+
+            if(player->isHumanPlayer())
+                this->gtinfo_->playerSpawned(player);
+            
             this->playerPostSpawn(player);
         }
