#include "mousegametype.h" namespace orxonox { RegisterUnloadableClass(MouseGametype); MouseGametype::MouseGametype(Context* context):Gametype(context) { RegisterObject(MouseGametype); player_ =nullptr; //Activate the Mouse Cursor this->setHUDTemplate("MouseCursor"); } void MouseGametype::start() { Gametype::start(); } void MouseGametype::spawnPlayersIfRequested() { // Spawn a human player. for (const auto& mapEntry : this->players_) if (mapEntry.first->isHumanPlayer() && (mapEntry.first->isReadyToSpawn() || this->bForceSpawn_)) this->spawnPlayer(mapEntry.first); } void MouseGametype::spawnPlayer(PlayerInfo* player) { assert(player); //Only Spawn once if(this->player_ == nullptr) { this->player_ = player; this->players_[player].state_ = PlayerState::Alive; } } }