Changeset 4949 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons/weapon_manager.cc
- Timestamp:
- Jul 24, 2005, 3:11:36 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/weapon_manager.cc
r4926 r4949 40 40 } 41 41 42 WeaponManager::WeaponManager(const TiXmlElement* root) 43 { 44 this->init(); 45 this->loadParams(root); 46 } 42 47 43 48 /** … … 51 56 world will clean them up for me 52 57 */ 53 for(int i = 0; i < W _MAX_CONFIGS; ++i)58 for(int i = 0; i < WM_MAX_CONFIGS; ++i) 54 59 { 55 60 this->configs[i].bUsed = false; 56 for(int j = 0; j < W _MAX_SLOTS; ++j)61 for(int j = 0; j < WM_MAX_SLOTS; ++j) 57 62 this->configs[i].slots[j] = NULL; 58 63 } … … 69 74 this->setClassID(CL_WEAPON_MANAGER, "WeaponManager"); 70 75 71 for(int i = 0; i < W _MAX_CONFIGS; ++i)76 for(int i = 0; i < WM_MAX_CONFIGS; ++i) 72 77 { 73 78 this->configs[i].bUsed = false; 74 for(int j = 0; j < W _MAX_SLOTS; ++j)79 for(int j = 0; j < WM_MAX_SLOTS; ++j) 75 80 this->configs[i].slots[j] = NULL; 76 81 } … … 186 191 int i, lastConfID; 187 192 lastConfID = this->currConfID; 188 for(i = this->currConfID + 1; i < W _MAX_CONFIGS && !this->configs[i].bUsed; ++i);189 if( i == W _MAX_CONFIGS) this->currConfID = WM_CONFIG0;193 for(i = this->currConfID + 1; i < WM_MAX_CONFIGS && !this->configs[i].bUsed; ++i); 194 if( i == WM_MAX_CONFIGS) this->currConfID = WM_CONFIG0; 190 195 else this->currConfID = i; 191 196 192 197 193 198 Weapon *w1, *w2; 194 for(int j = 0; j < W _MAX_SLOTS; ++j)199 for(int j = 0; j < WM_MAX_SLOTS; ++j) 195 200 { 196 201 w1 = this->configs[lastConfID].slots[j]; … … 224 229 { 225 230 Weapon* firingWeapon; 226 for(int i = 0; i < W _MAX_SLOTS; ++i)231 for(int i = 0; i < WM_MAX_SLOTS; ++i) 227 232 { 228 233 firingWeapon = this->configs[this->currConfID].slots[i]; … … 241 246 { 242 247 Weapon* w; 243 for(int i = 0; i < W _MAX_SLOTS; ++i)248 for(int i = 0; i < WM_MAX_SLOTS; ++i) 244 249 { 245 250 w = this->configs[this->currConfID].slots[i]; … … 259 264 Weapon* w; 260 265 for (int j = 0; j < 4; ++j ) 261 for(int i = 0; i < W _MAX_SLOTS; ++i)266 for(int i = 0; i < WM_MAX_SLOTS; ++i) 262 267 { 263 268 w = this->configs[j].slots[i]; … … 274 279 int WeaponManager::getNextFreeSlot(int configID) 275 280 { 276 for( int i = 0; i < W _MAX_SLOTS; ++i)281 for( int i = 0; i < WM_MAX_SLOTS; ++i) 277 282 { 278 283 if( this->configs[configID].slots[i] == NULL)
Note: See TracChangeset
for help on using the changeset viewer.