Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10534 in orxonox.OLD for trunk/src/world_entities/mount_point.cc


Ignore:
Timestamp:
Jan 31, 2007, 3:13:28 AM (19 years ago)
Author:
patrick
Message:

mounting weapon slots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/mount_point.cc

    r10529 r10534  
    186186      this->_mount->setParent( this);
    187187
    188       this->_mount->toList((OM_LIST)(this->getOMListNumber()));
     188      dynamic_cast<WorldEntity*>(this->_mount)->toList((OM_LIST)(this->getOMListNumber()));
    189189    }
    190190    else if( obj->isA( WeaponSlot::staticClassID()))
    191191    {
    192192      PRINTF(0)("=========+>we got a weapon slot\n");
     193
     194      // cast down the object to WE
     195      this->_mount = dynamic_cast<WeaponSlot*>(obj);
     196
     197      // now set the position, direction and reparent it to this node
     198      this->_mount->setAbsCoor( this->getAbsCoor());
     199      this->_mount->setAbsDir( this->getAbsDir());
     200      this->_mount->setParent( this);
    193201    }
    194202  }
     
    232240 * @param entity entity to be added
    233241 */
    234 void MountPoint::mount(WorldEntity* entity)
     242void MountPoint::mount(PNode* entity)
    235243{
    236244  this->_mount = entity;
Note: See TracChangeset for help on using the changeset viewer.