Changeset e4c60ba in network-game for common


Ignore:
Timestamp:
May 25, 2013, 8:31:40 PM (12 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

Location:
common
Files:
2 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
  • common/WorldMap.h

    ra6066e8 re4c60ba  
    6060   StructureType getStructure(int x, int y);
    6161   void setStructure(int x, int y, StructureType type);
     62   POSITION getStructureLocation(StructureType type);
    6263
    6364   vector<Object>* getObjects();
Note: See TracChangeset for help on using the changeset viewer.