Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 9, 2011, 4:16:24 PM (13 years ago)
Author:
jo
Message:

Adding some variables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamecontent/src/orxonox/gametypes/TeamGametype.cc

    r8923 r8930  
    3131#include "core/CoreIncludes.h"
    3232#include "core/ConfigValueIncludes.h"
     33#include "infos/PlayerInfo.h"
    3334#include "interfaces/TeamColourable.h"
    3435#include "worldentities/TeamSpawnPoint.h"
     
    4546        this->teams_ = 2;
    4647        this->allowFriendlyFire_ = false;
    47 
     48        //this->playersPerTeam_ = 0;
     49        this->maxPlayers_ = 0;
    4850        this->setConfigValues();
    4951    }
     
    104106    }
    105107
     108    void TeamGametype::spawnDeadPlayersIfRequested()
     109    {
     110        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end();
     111++it)
     112        if (it->second.state_ == PlayerState::Dead)
     113        {
     114         if ((it->first->isReadyToSpawn() || this->bForceSpawn_))
     115            {
     116               this->spawnPlayer(it->first);
     117            }
     118        }
     119    }
     120
     121
    106122    bool TeamGametype::allowPawnHit(Pawn* victim, Pawn* originator)
    107123    {// hit allowed: if victim & originator are foes or if originator doesnot exist or if friendlyfire is allowed
Note: See TracChangeset for help on using the changeset viewer.