Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9406 in orxonox.OLD for trunk/src/world_entities/weapons


Ignore:
Timestamp:
Jul 24, 2006, 11:09:47 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the proxy back

merged with commandsvn merge -r9346:HEAD https://svn.orxonox.net/orxonox/branches/proxy .

no conflicts

Location:
trunk/src/world_entities/weapons
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/aim.cc

    r7370 r9406  
    2727#include "world_entity.h"
    2828
    29 using namespace std;
     29
    3030
    3131
  • trunk/src/world_entities/weapons/aiming_system.cc

    r9298 r9406  
    2828
    2929
    30 using namespace std;
     30
    3131
    3232
     
    9191
    9292
    93   for( int i = 0; i < this->selectionList.size(); i++)
     93  for(unsigned int i = 0; i < this->selectionList.size(); i++)
    9494  {
    9595    distance = fabs((this->getAbsCoor() - this->selectionList[i]->getAbsCoor()).len());
     
    101101  }
    102102
    103   PRINTF(0)("entity: %s\n", nearestEntity->getClassName());
     103  PRINTF(0)("entity: %s\n", nearestEntity->getClassCName());
    104104    return nearestEntity;
    105105}
     
    115115  if( this->owner != killer)
    116116  {
    117     //PRINTF(0)("real hit: %s\n", killer->getClassName());
     117    //PRINTF(0)("real hit: %s\n", killer->getClassCName());
    118118    this->selectionList.push_back(killer);
    119119  }
  • trunk/src/world_entities/weapons/aiming_turret.cc

    r8777 r9406  
    2929CREATE_FACTORY(AimingTurret, CL_AIMING_TURRET);
    3030
    31 using namespace std;
     31
    3232
    3333
  • trunk/src/world_entities/weapons/ammo_container.cc

    r6846 r9406  
    2222#include <assert.h>
    2323
    24 using namespace std;
     24
    2525
    2626/**
  • trunk/src/world_entities/weapons/cannon.cc

    r8777 r9406  
    3535
    3636
    37 using namespace std;
     37
    3838
    3939CREATE_FACTORY(Cannon, CL_CANNON);
  • trunk/src/world_entities/weapons/crosshair.cc

    r7868 r9406  
    2424#include "material.h"
    2525
    26 using namespace std;
     26
    2727
    2828
  • trunk/src/world_entities/weapons/fps_sniper_rifle.cc

    r9235 r9406  
    3636#include "effects/explosion.h"
    3737
    38 using namespace std;
     38
    3939
    4040
  • trunk/src/world_entities/weapons/hyperblaster.cc

    r8777 r9406  
    3434
    3535
    36 using namespace std;
     36
    3737
    3838CREATE_FACTORY(Hyperblaster, CL_HYPERBLASTER);
  • trunk/src/world_entities/weapons/targeting_turret.cc

    r8777 r9406  
    2929CREATE_FACTORY(TargetingTurret, CL_TARGETING_TURRET);
    3030
    31 using namespace std;
     31
    3232
    3333
  • trunk/src/world_entities/weapons/turret.cc

    r8777 r9406  
    2929CREATE_FACTORY(Turret, CL_TURRET);
    3030
    31 using namespace std;
     31
    3232
    3333/**
  • trunk/src/world_entities/weapons/weapon.cc

    r8977 r9406  
    3636#include "elements/glgui_energywidget.h"
    3737
    38 using namespace std;
     38
    3939
    4040////////////////////
     
    199199  else
    200200  {
    201     PRINTF(1)("Projectile %s does not exist for weapon %s\n", projectile.c_str(), this->getName());
     201    PRINTF(1)("Projectile %s does not exist for weapon %s\n", projectile.c_str(), this->getCName());
    202202  }
    203203}
     
    213213    projectileFactory->prepare(count);
    214214  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());
    216216}
    217217
     
    234234  else
    235235  {
    236     PRINTF(2)("No projectile defined for Weapon %s(%s) can't return any\n", this->getName(), this->getClassName());
     236    PRINTF(2)("No projectile defined for Weapon %s(%s) can't return any\n", this->getCName(), this->getClassCName());
    237237    return NULL;
    238238  }
     
    313313  {
    314314    this->energyWidget = new OrxGui::GLGuiEnergyWidget();
    315     this->energyWidget->setDisplayedName(this->getClassName());
     315    this->energyWidget->setDisplayedName(this->getClassCName());
    316316    this->energyWidget->setSize2D( 20, 100);
    317317    this->energyWidget->setMaximum(this->getEnergyMax());
     
    442442    this->updateWidgets();
    443443    // activate
    444     PRINTF(4)("Activating the Weapon %s\n", this->getName());
     444    PRINTF(4)("Activating the Weapon %s\n", this->getCName());
    445445    this->activate();
    446446    // setting up for next action
     
    458458  //  if (this->currentState != WS_INACTIVE)
    459459  {
    460     PRINTF(4)("Deactivating the Weapon %s\n", this->getName());
     460    PRINTF(4)("Deactivating the Weapon %s\n", this->getCName());
    461461    // play Sound
    462462    if (this->soundBuffers[WA_DEACTIVATE] != NULL)
     
    527527bool Weapon::reloadW()
    528528{
    529   PRINTF(4)("Reloading Weapon %s\n", this->getName());
     529  PRINTF(4)("Reloading Weapon %s\n", this->getCName());
    530530  if (this->ammoContainer.get() != NULL &&
    531531      unlikely(this->energy + this->ammoContainer->getStoredEnergy() < this->minCharge))
     
    632632void Weapon::debug() const
    633633{
    634   PRINT(0)("Weapon-Debug %s, state: %s (duration: %fs), nextAction: %s\n", this->getName(), 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));
    635635  PRINT(0)("Energy: max: %f; current: %f; chargeMin: %f, chargeMax %f\n",
    636636           this->energyMax, this->energy, this->minCharge, this->maxCharge);
  • trunk/src/world_entities/weapons/weapon_manager.cc

    r8844 r9406  
    8383    // NAMING
    8484    char* tmpName;
    85     if (this->getName())
    86     {
    87       tmpName = new char[strlen(this->getName()) + 10];
    88       sprintf(tmpName, "%s_slot%d", this->getName(), i);
     85    if (!this->getName().empty())
     86    {
     87      tmpName = new char[this->getName().size() + 10];
     88      sprintf(tmpName, "%s_slot%d", this->getCName(), i);
    8989    }
    9090    else
     
    265265  if (configID > 0 && slotID > 0 && this->configs[configID][slotID] != NULL)
    266266  {
    267     PRINTF(3)("Weapon-slot %d/%d of %s already poulated, remove weapon (%s::%s) first\n", configID, slotID, this->getName(), 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());
    268268    return false;
    269269  }
     
    302302    weapon->setDefaultTarget(this->crosshair);
    303303  }
    304   PRINTF(3)("Added a new Weapon (%s::%s) to the WeaponManager: config %i/ slot %i\n", weapon->getClassName(), 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);
    305305  return true;
    306306}
     
    555555    {
    556556      if (this->configs[i][j] != NULL)
    557         PRINT(3)("Slot %d loaded a %s\n", j, this->configs[i][j]->getClassName());
    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.