Changeset 9371 in orxonox.OLD for branches/proxy/src/world_entities/weapons
- Timestamp:
- Jul 20, 2006, 11:08:16 PM (19 years ago)
- Location:
- branches/proxy/src/world_entities/weapons
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/world_entities/weapons/aiming_system.cc
r9357 r9371 101 101 } 102 102 103 PRINTF(0)("entity: %s\n", nearestEntity->getClass Name());103 PRINTF(0)("entity: %s\n", nearestEntity->getClassCName()); 104 104 return nearestEntity; 105 105 } -
branches/proxy/src/world_entities/weapons/weapon.cc
r9357 r9371 199 199 else 200 200 { 201 PRINTF(1)("Projectile %s does not exist for weapon %s\n", projectile.c_str(), this->get Name());201 PRINTF(1)("Projectile %s does not exist for weapon %s\n", projectile.c_str(), this->getCName()); 202 202 } 203 203 } … … 213 213 projectileFactory->prepare(count); 214 214 else 215 PRINTF(2)("unable to create %d projectile for Weapon %s (%s)\n", count, this->getName(), this->getClassName());215 PRINTF(2)("unable to create %d projectile for Weapon %s::%s\n", count, this->getClassCName(), this->getCName()); 216 216 } 217 217 … … 234 234 else 235 235 { 236 PRINTF(2)("No projectile defined for Weapon %s(%s) can't return any\n", this->get Name(), this->getClassName());236 PRINTF(2)("No projectile defined for Weapon %s(%s) can't return any\n", this->getCName(), this->getClassCName()); 237 237 return NULL; 238 238 } … … 442 442 this->updateWidgets(); 443 443 // activate 444 PRINTF(4)("Activating the Weapon %s\n", this->get Name());444 PRINTF(4)("Activating the Weapon %s\n", this->getCName()); 445 445 this->activate(); 446 446 // setting up for next action … … 458 458 // if (this->currentState != WS_INACTIVE) 459 459 { 460 PRINTF(4)("Deactivating the Weapon %s\n", this->get Name());460 PRINTF(4)("Deactivating the Weapon %s\n", this->getCName()); 461 461 // play Sound 462 462 if (this->soundBuffers[WA_DEACTIVATE] != NULL) … … 527 527 bool Weapon::reloadW() 528 528 { 529 PRINTF(4)("Reloading Weapon %s\n", this->get Name());529 PRINTF(4)("Reloading Weapon %s\n", this->getCName()); 530 530 if (this->ammoContainer.get() != NULL && 531 531 unlikely(this->energy + this->ammoContainer->getStoredEnergy() < this->minCharge)) … … 632 632 void Weapon::debug() const 633 633 { 634 PRINT(0)("Weapon-Debug %s, state: %s (duration: %fs), nextAction: %s\n", this->get Name(), Weapon::stateToChar(this->currentState), this->stateDuration, Weapon::actionToChar(requestedAction));634 PRINT(0)("Weapon-Debug %s, state: %s (duration: %fs), nextAction: %s\n", this->getCName(), Weapon::stateToChar(this->currentState), this->stateDuration, Weapon::actionToChar(requestedAction)); 635 635 PRINT(0)("Energy: max: %f; current: %f; chargeMin: %f, chargeMax %f\n", 636 636 this->energyMax, this->energy, this->minCharge, this->maxCharge); -
branches/proxy/src/world_entities/weapons/weapon_manager.cc
r8844 r9371 83 83 // NAMING 84 84 char* tmpName; 85 if ( this->getName())86 { 87 tmpName = new char[ strlen(this->getName()) + 10];88 sprintf(tmpName, "%s_slot%d", this->get Name(), i);85 if (!this->getName().empty()) 86 { 87 tmpName = new char[this->getName().size() + 10]; 88 sprintf(tmpName, "%s_slot%d", this->getCName(), i); 89 89 } 90 90 else … … 265 265 if (configID > 0 && slotID > 0 && this->configs[configID][slotID] != NULL) 266 266 { 267 PRINTF(3)("Weapon-slot %d/%d of %s already poulated, remove weapon (%s::%s) first\n", configID, slotID, this->get Name(), weapon->getClassName(), weapon->getName());267 PRINTF(3)("Weapon-slot %d/%d of %s already poulated, remove weapon (%s::%s) first\n", configID, slotID, this->getCName(), weapon->getClassCName(), weapon->getCName()); 268 268 return false; 269 269 } … … 302 302 weapon->setDefaultTarget(this->crosshair); 303 303 } 304 PRINTF(3)("Added a new Weapon (%s::%s) to the WeaponManager: config %i/ slot %i\n", weapon->getClass Name(), weapon->getName(), configID, slotID);304 PRINTF(3)("Added a new Weapon (%s::%s) to the WeaponManager: config %i/ slot %i\n", weapon->getClassCName(), weapon->getCName(), configID, slotID); 305 305 return true; 306 306 } … … 555 555 { 556 556 if (this->configs[i][j] != NULL) 557 PRINT(3)("Slot %d loaded a %s\n", j, this->configs[i][j]->getClass Name());558 } 559 } 560 } 557 PRINT(3)("Slot %d loaded a %s\n", j, this->configs[i][j]->getClassCName()); 558 } 559 } 560 }
Note: See TracChangeset
for help on using the changeset viewer.