Changeset 9ba9b96 in network-game for common/WorldMap.cpp
- Timestamp:
- Jan 20, 2014, 4:59:34 PM (11 years ago)
- Branches:
- master
- Children:
- 949cf70
- Parents:
- d998572
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/WorldMap.cpp
rd998572 r9ba9b96 102 102 // used by the server to create new objects 103 103 void WorldMap::addObject(WorldMap::ObjectType t, int x, int y) { 104 int id;104 unsigned int id; 105 105 vector<WorldMap::Object>::iterator it; 106 106 … … 111 111 } 112 112 113 if (it == vctObjects->end()) // if no objects with this id exist s113 if (it == vctObjects->end()) // if no objects with this id exist 114 114 break; 115 115 } … … 120 120 121 121 // used by the client to update object positions or create objects it has not seen before 122 void WorldMap::updateObject( int id, WorldMap::ObjectType t, int x, int y) {122 void WorldMap::updateObject(unsigned int id, WorldMap::ObjectType t, int x, int y) { 123 123 vector<WorldMap::Object>::iterator it; 124 124 bool foundObject = false; … … 157 157 } 158 158 159 bool WorldMap::removeObject( int id) {159 bool WorldMap::removeObject(unsigned int id) { 160 160 vector<WorldMap::Object>::iterator it; 161 161 … … 316 316 /*** Functions for Object ***/ 317 317 318 WorldMap::Object::Object( int id, ObjectType type, int x, int y) {318 WorldMap::Object::Object(unsigned int id, ObjectType type, int x, int y) { 319 319 this->type = type; 320 320 this->id = id; … … 323 323 } 324 324 325 WorldMap::Object::Object( int id, ObjectType type, POSITION pos) {325 WorldMap::Object::Object(unsigned int id, ObjectType type, POSITION pos) { 326 326 this->type = type; 327 327 this->id = id;
Note:
See TracChangeset
for help on using the changeset viewer.