- Timestamp:
- Jan 31, 2007, 3:13:28 AM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/mount_point.cc
r10529 r10534 186 186 this->_mount->setParent( this); 187 187 188 this->_mount->toList((OM_LIST)(this->getOMListNumber()));188 dynamic_cast<WorldEntity*>(this->_mount)->toList((OM_LIST)(this->getOMListNumber())); 189 189 } 190 190 else if( obj->isA( WeaponSlot::staticClassID())) 191 191 { 192 192 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); 193 201 } 194 202 } … … 232 240 * @param entity entity to be added 233 241 */ 234 void MountPoint::mount( WorldEntity* entity)242 void MountPoint::mount(PNode* entity) 235 243 { 236 244 this->_mount = entity; -
trunk/src/world_entities/mount_point.h
r10314 r10534 29 29 30 30 31 void mount( WorldEntity* entity);31 void mount(PNode* entity); 32 32 void unmount(); 33 33 34 34 35 35 private: 36 WorldEntity*_mount; //!< the entity mounted at this mount point36 PNode* _mount; //!< the entity mounted at this mount point 37 37 std::string _name; //!< the name of the mount point 38 38 -
trunk/src/world_entities/weapons/weapon_slot.cc
r10440 r10534 23 23 24 24 ObjectListDefinition(WeaponSlot); 25 CREATE_FACTORY(WeaponSlot); 26 25 27 26 28 … … 51 53 LoadParam(root, "WeaponClass", this, WeaponSlot, setWeaponClass) 52 54 .describe("Sets the class this mount points should host"); 55 56 LoadParam(root, "slot", this, WeaponSlot, setWeaponConfig) 57 .describe("sets the weapon slot"); 53 58 } 54 59 -
trunk/src/world_entities/weapons/weapon_slot.h
r10440 r10534 36 36 inline void setNextWeapon(Weapon* weapon) { this->nextWeapon = weapon; } 37 37 38 39 inline void setWeaponConfig(int slot, int side) { this->weaponSlot = slot; this->weaponSide = side; } 40 inline int getWeaponSlot() { return this->weaponSlot; } 41 inline int getWeaponSide() { return this->weaponSide; } 42 43 38 44 private: 45 46 int weaponSlot; 47 int weaponSide; 39 48 40 49 long capability; //!< the capabilities of the Slot @see WeaponSlotCapability.
Note: See TracChangeset
for help on using the changeset viewer.