Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6137 in orxonox.OLD for branches/objectmanager/src/world_entities


Ignore:
Timestamp:
Dec 16, 2005, 6:10:59 PM (19 years ago)
Author:
bensch
Message:

om: linkage-fixes in the WeaponManager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/objectmanager/src/world_entities/weapons/weapon_manager.cc

    r6123 r6137  
    244244  //! @todo check if the weapon is already assigned to another config in another slot
    245245  this->configs[configID][slotID] = weapon;
    246   weapon->toList(parent->getOMListNumber());
    247246  if (this->parent != NULL)
     247  {
    248248    this->parent->addChild(weapon);
     249  }
    249250  PRINTF(3)("Added a new Weapon to the WeaponManager: config %i/ slot %i\n", configID, slotID);
    250251}
     
    372373      else
    373374      {
     375        if (this->currentSlotConfig[i].currentWeapon != NULL)
     376          this->currentSlotConfig[i].currentWeapon->toList(OM_NULL);
    374377        tickWeapon = this->currentSlotConfig[i].currentWeapon = this->currentSlotConfig[i].nextWeapon;
    375378        if (tickWeapon != NULL)
     
    377380          tickWeapon->requestAction(WA_ACTIVATE);
    378381          tickWeapon->setParent(&this->currentSlotConfig[i].position);
     382          tickWeapon->toList(this->parent->getOMListNumber());
    379383          this->currentSlotConfig[i].position.activateNode();
    380384        }
Note: See TracChangeset for help on using the changeset viewer.