Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 18, 2011, 1:18:51 AM (13 years ago)
Author:
jo
Message:

Repaired xml-interface in order to set a bot's team directly in the level.

Location:
code/branches/presentation2011
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2011/data/levels/lastTeamStandingII.oxw

    r8981 r8996  
    11<LevelInfo
    2  name = "On the fly"
    3  description = "Survive as a team."
     2 name = "Last Team Standing II"
     3 description = "Last Team Standing in an abstract level."
    44 screenshot = "onthefly.png"
    55 tags = "gametype"
     
    1616
    1717<Level
    18  name         = "On the fly"
    19  description  = "testmap for gametype last team standing"
    2018 gametype     = "LastTeamStanding"
    2119>
  • code/branches/presentation2011/data/levels/missionOne.oxw

    r8994 r8996  
    2121
    2222<Level
    23  name         = "Mission One"
    24  description  = "How to steer a spaceship."
    2523 gametype     = "Mission"
    2624>
  • code/branches/presentation2011/src/libraries/core/GUIManager.cc

    r8980 r8996  
    223223
    224224    GUIManager* GUIManager::singletonPtr_s = 0;
    225     /*static*/ const std::string GUIManager::defaultScheme_ = "Orxonox"; //TaharezGreen
     225    /*static*/ const std::string GUIManager::defaultScheme_ = "TaharezGreen"; //Alternative: Orxonox (not fully complete yet, see the graphics menu)
    226226
    227227    SetConsoleCommand("showGUI", &GUIManager::showGUI).defaultValue(1, false).defaultValue(2, false);
  • code/branches/presentation2011/src/orxonox/controllers/FormationController.cc

    r8995 r8996  
    129129        SUPER(FormationController, XMLPort, xmlelement, mode);
    130130
     131        XMLPortParam(FormationController, "team", setTeam, getTeam, xmlelement, mode).defaultValues(-1);
    131132        XMLPortParam(FormationController, "formationFlight", setFormationFlight, getFormationFlight, xmlelement, mode).defaultValues(false);
    132133        XMLPortParam(FormationController, "formationSize", setFormationSize, getFormationSize, xmlelement, mode).defaultValues(STANDARD_MAX_FORMATION_SIZE);
  • code/branches/presentation2011/src/orxonox/gametypes/TeamGametype.cc

    r8995 r8996  
    4949        this->allowFriendlyFire_ = false;
    5050        //this->playersPerTeam_ = 0;
    51         this->maxPlayers_ = 2; //TEST
     51        this->maxPlayers_ = 0; //Value "0": no limit is set.
    5252        this->setConfigValues();
    5353    }
     
    7575    void TeamGametype::playerEntered(PlayerInfo* player)
    7676    {
     77        if(player == NULL) return; // catch null pointers
    7778        Gametype::playerEntered(player);
    78         if(player == NULL) return;
    7979        this->findAndSetTeam(player);
    8080        if( this->players_.size() <= maxPlayers_ || maxPlayers_  ==  0)
     
    9191    void TeamGametype::findAndSetTeam(PlayerInfo* player)
    9292    {
    93          std::vector<unsigned int> playersperteam(this->teams_, 0);
     93        if(player == NULL) return; // catch null pointers
     94        std::vector<unsigned int> playersperteam(this->teams_, 0);
    9495
    9596        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
     
    121122                 if(it->second == false) // waiting player found
    122123                 {it->second = true; break;} // allow player to enter
    123                         }
    124                 }
     124            }
     125        }
    125126
    126127        if (valid_player)
     
    140141            if(allowedInGame_[it->first] == false)//check if dead player is allowed to enter
    141142            {
    142                                 continue;
     143                continue;
    143144            }
    144145            if (it->second.state_ == PlayerState::Dead)
Note: See TracChangeset for help on using the changeset viewer.