Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10057 in orxonox.OLD for branches/mount_points


Ignore:
Timestamp:
Dec 13, 2006, 10:30:06 AM (18 years ago)
Author:
patrick
Message:

mount point connection

Location:
branches/mount_points/src/world_entities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/mount_points/src/world_entities/mount_point.cc

    r10050 r10057  
    7575  this->registerObject(this, MountPoint::_objectList);
    7676  this->toList(OM_GROUP_00);
     77
     78  this->mount = NULL;
    7779}
    7880
     
    117119
    118120}
     121
     122
     123/**
     124 * adds an entity to this mount point
     125 * @param entity entity to be added
     126 */
     127void MountPoint::mount(WorldEntity* entity)
     128{}
     129
     130
     131/**
     132 * removes an entity from this mount point
     133 */
     134void MountPoint::unmount()
     135{}
  • branches/mount_points/src/world_entities/mount_point.h

    r10050 r10057  
    2525    void debugDraw() const;
    2626
     27
     28    void mount(WorldEntity* entity);
     29    void unmount();
     30
     31
     32  private:
     33    WorldEntity*         mount;       //!< the entity mounted at this mount point
     34
    2735};
    2836
  • branches/mount_points/src/world_entities/world_entity.cc

    r10056 r10057  
    322322void WorldEntity::addMountPoint(MountPoint* mountPoint)
    323323{
     324  // add the mount point at the last position
     325  this->mountPoints.push_back(mountPoint);
    324326}
    325327
     
    330332void WorldEntity::addMountPoint(int slot, MountPoint* mountPoint)
    331333{
    332 
     334  if( this->mountPoints[slot] != NULL)
     335  {
     336    PRINTF(0)("adding a mount point to a slot, that already exists! ignoring - maybe some object do not get connected well (object: %s)", this->getClassCName());
     337  }
     338
     339  // just connect the mount point
     340  this->mountPoints[slot] = mountPoint;
    333341}
    334342
Note: See TracChangeset for help on using the changeset viewer.