Changeset e4c60ba in network-game for common/WorldMap.cpp


Ignore:
Timestamp:
May 25, 2013, 8:31:40 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
7553db9
Parents:
a6066e8
Message:

Players can turn in flags they have picked up to their own flag sites

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/WorldMap.cpp

    ra6066e8 re4c60ba  
    6363{
    6464   (*(*vctStructures)[x])[y] = t;
     65}
     66
     67POSITION WorldMap::getStructureLocation(StructureType t)
     68{
     69   POSITION pos;
     70   pos.x = 0;
     71   pos.y = 0;
     72
     73   for (int x=0; x<vctStructures->size(); x++) {
     74      for (int y=0; y<(*vctStructures)[x]->size(); y++) {
     75        if ((*(*vctStructures)[x])[y] == t) {
     76           pos.x = x;
     77           pos.y = y;
     78           return pos;
     79        }
     80      }
     81   }
     82
     83   return pos;
    6584}
    6685
Note: See TracChangeset for help on using the changeset viewer.