Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9371 in orxonox.OLD for branches/proxy/src/world_entities/weapons


Ignore:
Timestamp:
Jul 20, 2006, 11:08:16 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: ORXONOX is now completely std::stringed

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  
    101101  }
    102102
    103   PRINTF(0)("entity: %s\n", nearestEntity->getClassName());
     103  PRINTF(0)("entity: %s\n", nearestEntity->getClassCName());
    104104    return nearestEntity;
    105105}
  • branches/proxy/src/world_entities/weapons/weapon.cc

    r9357 r9371  
    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  }
     
    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);
  • branches/proxy/src/world_entities/weapons/weapon_manager.cc

    r8844 r9371  
    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.