Changeset 9406 in orxonox.OLD for trunk/src/world_entities/weapons
- Timestamp:
- Jul 24, 2006, 11:09:47 AM (18 years ago)
- Location:
- trunk/src/world_entities/weapons
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/aim.cc
r7370 r9406 27 27 #include "world_entity.h" 28 28 29 using namespace std; 29 30 30 31 31 -
trunk/src/world_entities/weapons/aiming_system.cc
r9298 r9406 28 28 29 29 30 using namespace std; 30 31 31 32 32 … … 91 91 92 92 93 for( int i = 0; i < this->selectionList.size(); i++)93 for(unsigned int i = 0; i < this->selectionList.size(); i++) 94 94 { 95 95 distance = fabs((this->getAbsCoor() - this->selectionList[i]->getAbsCoor()).len()); … … 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 } … … 115 115 if( this->owner != killer) 116 116 { 117 //PRINTF(0)("real hit: %s\n", killer->getClass Name());117 //PRINTF(0)("real hit: %s\n", killer->getClassCName()); 118 118 this->selectionList.push_back(killer); 119 119 } -
trunk/src/world_entities/weapons/aiming_turret.cc
r8777 r9406 29 29 CREATE_FACTORY(AimingTurret, CL_AIMING_TURRET); 30 30 31 using namespace std; 31 32 32 33 33 -
trunk/src/world_entities/weapons/ammo_container.cc
r6846 r9406 22 22 #include <assert.h> 23 23 24 using namespace std; 24 25 25 26 26 /** -
trunk/src/world_entities/weapons/cannon.cc
r8777 r9406 35 35 36 36 37 using namespace std; 37 38 38 39 39 CREATE_FACTORY(Cannon, CL_CANNON); -
trunk/src/world_entities/weapons/crosshair.cc
r7868 r9406 24 24 #include "material.h" 25 25 26 using namespace std; 26 27 27 28 28 -
trunk/src/world_entities/weapons/fps_sniper_rifle.cc
r9235 r9406 36 36 #include "effects/explosion.h" 37 37 38 using namespace std; 38 39 39 40 40 -
trunk/src/world_entities/weapons/hyperblaster.cc
r8777 r9406 34 34 35 35 36 using namespace std; 36 37 37 38 38 CREATE_FACTORY(Hyperblaster, CL_HYPERBLASTER); -
trunk/src/world_entities/weapons/targeting_turret.cc
r8777 r9406 29 29 CREATE_FACTORY(TargetingTurret, CL_TARGETING_TURRET); 30 30 31 using namespace std; 31 32 32 33 33 -
trunk/src/world_entities/weapons/turret.cc
r8777 r9406 29 29 CREATE_FACTORY(Turret, CL_TURRET); 30 30 31 using namespace std; 31 32 32 33 33 /** -
trunk/src/world_entities/weapons/weapon.cc
r8977 r9406 36 36 #include "elements/glgui_energywidget.h" 37 37 38 using namespace std; 38 39 39 40 40 //////////////////// … … 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 } … … 313 313 { 314 314 this->energyWidget = new OrxGui::GLGuiEnergyWidget(); 315 this->energyWidget->setDisplayedName(this->getClass Name());315 this->energyWidget->setDisplayedName(this->getClassCName()); 316 316 this->energyWidget->setSize2D( 20, 100); 317 317 this->energyWidget->setMaximum(this->getEnergyMax()); … … 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); -
trunk/src/world_entities/weapons/weapon_manager.cc
r8844 r9406 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.