Changeset e76055f in network-game for common/Player.cpp
- Timestamp:
- May 18, 2013, 8:50:33 PM (12 years ago)
- Branches:
- master
- Children:
- e4a5786
- Parents:
- d69eb32
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Player.cpp
rd69eb32 re76055f 113 113 } 114 114 115 //cout << "newPos.x: " << newPos.x << endl;116 //cout << "newPos.y: " << newPos.y << endl;117 //cout << "newPos.x/25: " << newPos.x/25 << endl;118 //cout << "newPos.y/25: " << newPos.y/25 << endl;119 120 115 switch(map->getElement(newPos.x/25, newPos.y/25)) { 121 116 case WorldMap::TERRAIN_NONE: 117 case WorldMap::TERRAIN_OCEAN: 122 118 case WorldMap::TERRAIN_ROCK: 123 119 cout << "Encountered invalid terrain" << endl; … … 132 128 break; 133 129 } 130 131 // using moveCanceled in a hacky way just to indicate that the server 132 // has updated some player info. Should change the variable name 133 switch(map->getObject(newPos.x/25, newPos.y/25)) { 134 case WorldMap::OBJECT_BLUE_FLAG: 135 hasBlueFlag = true; 136 moveCanceled = true; 137 break; 138 case WorldMap::OBJECT_RED_FLAG: 139 hasRedFlag = true; 140 moveCanceled = true; 141 break; 142 } 134 143 } 135 144
Note:
See TracChangeset
for help on using the changeset viewer.