Changeset 35f6097 in network-game


Ignore:
Timestamp:
Dec 22, 2013, 11:22:46 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
e62b56c
Parents:
5ae8dca
Message:

Players are revived correctly in individual games

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/server.cpp

    r5ae8dca r35f6097  
    163163            if (p->isDead)
    164164            {
     165
    165166               if (getCurrentMillis() - p->timeDied >= 10000)
    166167               {
     
    172173                  {
    173174                  case 0:// blue team
    174                      spawnPos = gameMap->getStructureLocation(WorldMap::STRUCTURE_BLUE_FLAG);
     175                     spawnPos = p->currentGame->getMap()->getStructureLocation(WorldMap::STRUCTURE_BLUE_FLAG);
    175176                     break;
    176177                  case 1:// red team
    177                      spawnPos = gameMap->getStructureLocation(WorldMap::STRUCTURE_RED_FLAG);
     178                     spawnPos = p->currentGame->getMap()->getStructureLocation(WorldMap::STRUCTURE_RED_FLAG);
    178179                     break;
    179180                  default:
     
    195196
    196197                  map<unsigned int, Player*>::iterator it2;
    197                   for (it2 = mapPlayers.begin(); it2 != mapPlayers.end(); it2++)
    198                   {
    199                      if ( msgProcessor.sendMessage(&serverMsg, sock, &(p->addr), &outputLog) < 0 )
     198                  for (it2 = p->currentGame->getPlayers().begin(); it2 != p->currentGame->getPlayers().end(); it2++)
     199                  {
     200                     if ( msgProcessor.sendMessage(&serverMsg, sock, &(it2->second->addr), &outputLog) < 0 )
    200201                        error("sendMessage");
    201202                  }
Note: See TracChangeset for help on using the changeset viewer.