Changeset 10058 in orxonox.OLD for branches/mount_points
- Timestamp:
- Dec 13, 2006, 10:44:37 AM (18 years ago)
- Location:
- branches/mount_points/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mount_points/src/world_entities/mount_point.cc
r10057 r10058 76 76 this->toList(OM_GROUP_00); 77 77 78 this-> mount = NULL;78 this->_mount = NULL; 79 79 } 80 80 … … 126 126 */ 127 127 void MountPoint::mount(WorldEntity* entity) 128 {} 128 { 129 this->_mount = entity; 130 } 129 131 130 132 … … 133 135 */ 134 136 void MountPoint::unmount() 135 {} 137 { 138 this->_mount = NULL; 139 } 140 -
branches/mount_points/src/world_entities/mount_point.h
r10057 r10058 31 31 32 32 private: 33 WorldEntity* mount; //!< the entity mounted at this mount point33 WorldEntity* _mount; //!< the entity mounted at this mount point 34 34 35 35 }; -
branches/mount_points/src/world_entities/world_entity.cc
r10057 r10058 24 24 #include "md2/md2Model.h" 25 25 #include "md3/md3_model.h" 26 26 27 #include "oif/object_information_file.h" 28 #include "mount_point.h" 27 29 28 30 #include "aabb_tree_node.h" … … 334 336 if( this->mountPoints[slot] != NULL) 335 337 { 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());338 PRINTF(0)("adding a mount point to a slot, that already exists! ignoring - maybe some object do not get connected well (object: %s)\n", this->getClassCName()); 337 339 } 338 340 … … 348 350 void WorldEntity::mount(int slot, WorldEntity* entity) 349 351 { 350 352 if( this->mountPoints[slot] == NULL) 353 { 354 PRINTF(0)("you tried to add an entity to a mount point that doesn't exist (slot %i)\n", slot); 355 return; 356 } 357 358 // mount the entity 359 this->mountPoints[slot]->mount(entity); 351 360 } 352 361 … … 358 367 void WorldEntity::unmount(int slot) 359 368 { 369 if( this->mountPoints[slot] == NULL) 370 { 371 PRINTF(0)("you tried to remove an entity from a mount point that doesn't exist (slot %i)\n", slot); 372 return; 373 } 374 375 // unmount the entity 376 this->mountPoints[slot]->unmount(); 360 377 } 361 378
Note: See TracChangeset
for help on using the changeset viewer.