Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 13, 2005, 10:02:40 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: optimizations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapons/weapon_manager.cc

    r4972 r4992  
    7676    this->currentSlotConfig[i].currentWeapon = NULL;
    7777    this->currentSlotConfig[i].nextWeapon = NULL;
     78
     79    // NAMING
     80    char* tmpName;
     81    if (this->getName())
     82    {
     83      tmpName = new char[strlen(this->getName()) + 10];
     84      sprintf(tmpName, "%s_slot%d", this->getName(), i);
     85    }
     86    else
     87    {
     88      tmpName = new char[30];
     89      sprintf(tmpName, "WeaponMan_slot%d", i);
     90    }
     91    this->currentSlotConfig[i].position.setName(tmpName);
     92    delete tmpName;
    7893  }
    7994
     
    131146}
    132147
     148/**
     149 * sets the Parent of the WeaponManager.
     150 * @param parent the parent of the WeaponManager
     151 *
     152 * this is used, to identify to which ship/man/whatever this WeaponManager is connected.
     153 * also all the Slots will be subconnected to this parent.
     154 */
    133155void WeaponManager::setParent(PNode* parent)
    134156{
Note: See TracChangeset for help on using the changeset viewer.