- Timestamp:
- Jan 31, 2007, 6:30:06 AM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/mount_point.cc
r10546 r10549 44 44 this->setRelCoor( center); 45 45 this->setRelDir( Quaternion(forward, up)); 46 47 this->_center = center; 48 this->_up = up; 49 this->_forward = forward; 46 50 47 51 this->init(); … … 191 195 { 192 196 PRINTF(0)("=========+>we got a weapon slot at\n"); 193 this->getRelCoor().debug(); 197 this->getAbsCoor().debug(); 198 this->_center.debug(); 194 199 195 200 … … 198 203 199 204 // now set the position, direction and reparent it to this node 200 this->_mount->set RelCoor( this->getRelCoor());201 this->_mount->set RelDir( this->getRelDir());205 this->_mount->setAbsCoor( this->_center); 206 this->_mount->setAbsDir( this->getAbsDir()); 202 207 this->_mount->setParent( this); 203 208 } -
trunk/src/world_entities/mount_point.h
r10540 r10549 28 28 void debugDraw() const; 29 29 30 inline const Vector& getCenter() { return this->_center; } 30 31 31 32 void mount(PNode* entity); … … 39 40 std::string _description; //!< string containing an optional description 40 41 42 Vector _center; 43 Vector _up; 44 Vector _forward; 45 41 46 }; 42 47 -
trunk/src/world_entities/npcs/npc.cc
r10546 r10549 304 304 this->setAI( false); 305 305 this->setAbsCoor(-10000,-10000,-10000); 306 306 307 307 308 308 } … … 409 409 int slot = ws->getWeaponSlot(); 410 410 int side = ws->getWeaponSide(); 411 this->getWeaponManager().setSlotPosition(slot, ws->getRelCoor());411 this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter()); 412 412 this->getWeaponManager().setSlotDirection(slot, ws->getRelDir()); 413 413 PRINTF(0)("setting slot %i\n", slot); 414 ws->getRelCoor().debug();414 (*it).second->getCenter().debug(); 415 415 } 416 416 }
Note: See TracChangeset
for help on using the changeset viewer.