Changeset 70fc3e8 in network-game


Ignore:
Timestamp:
Dec 18, 2013, 1:27:55 AM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
0129700
Parents:
4509648
Message:

Flags are placed correctly when a new game is created

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/server.cpp

    r4509648 r70fc3e8  
    990990         mapGames[gameName] = g;
    991991
     992         // add flag objects to the map
     993         WorldMap* m = g->getMap();
     994         for (int y=0; y<m->height; y++) {
     995            for (int x=0; x<m->width; x++) {
     996               switch (m->getStructure(x, y)) {
     997                  case WorldMap::STRUCTURE_BLUE_FLAG:
     998                     m->addObject(WorldMap::OBJECT_BLUE_FLAG, x*25+12, y*25+12);
     999                     break;
     1000                  case WorldMap::STRUCTURE_RED_FLAG:
     1001                     m->addObject(WorldMap::OBJECT_RED_FLAG, x*25+12, y*25+12);
     1002                     break;
     1003               }
     1004            }
     1005         }
     1006
    9921007         Player* p = findPlayerByAddr(mapPlayers, from);
    9931008         p->currentGame = g;
Note: See TracChangeset for help on using the changeset viewer.