Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.