- Timestamp:
- Jan 31, 2007, 5:15:54 AM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/mount_point.cc
r10540 r10542 140 140 if( this->_mount != NULL) 141 141 { 142 PRINTF(0)("Got detailed informations\n");142 // PRINTF(0)("Got detailed informations\n"); 143 143 this->_mount->loadParams( root); 144 144 145 145 if( this->_mount->isA(ParticleSystem::staticClassID())) 146 146 { 147 PRINTF(0)("got particle system. attaching it to mp\n");147 // PRINTF(0)("got particle system. attaching it to mp\n"); 148 148 dynamic_cast<ParticleSystem*>(this->_mount)->attachEmmittersTo(this, Vector(0,0,0), 149 149 this->getRelDir()*Quaternion(M_PI, Vector(0,1,0))); … … 177 177 if( obj->isA( WorldEntity::staticClassID())) 178 178 { 179 PRINTF(0)("Mount Point created a %s\n", obj->getCName());179 // PRINTF(0)("Mount Point created a %s\n", obj->getCName()); 180 180 // cast down the object to WE 181 181 this->_mount = dynamic_cast<WorldEntity*>(obj); … … 190 190 else if( obj->isA( WeaponSlot::staticClassID())) 191 191 { 192 PRINTF(0)("=========+>we got a weapon slot\n");192 // PRINTF(0)("=========+>we got a weapon slot\n"); 193 193 194 194 // cast down the object to WE -
trunk/src/world_entities/npcs/npc.cc
r10540 r10542 173 173 this->getWeaponManager().setSlotCount(7); 174 174 175 this->getWeaponManager().setSlotPosition(0, Vector(-2.6, .1, -3.0)); 176 this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 177 178 this->getWeaponManager().setSlotPosition(1, Vector(-2.6, .1, 3.0)); 179 this->getWeaponManager().setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 180 181 this->getWeaponManager().setSlotPosition(2, Vector(-1.5, .5, -.5)); 182 this->getWeaponManager().setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0))); 183 184 this->getWeaponManager().setSlotPosition(3, Vector(-1.5, .5, .5)); 185 this->getWeaponManager().setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0))); 186 187 this->getWeaponManager().setSlotPosition(4, Vector(-1.5, -.5, .5)); 188 this->getWeaponManager().setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0))); 189 190 this->getWeaponManager().setSlotPosition(5, Vector(-1.5, -.5, -.5)); 191 this->getWeaponManager().setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0))); 192 193 this->getWeaponManager().setSlotPosition(6, Vector(-1, 0.0, 0)); 194 this->getWeaponManager().setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 195 175 196 176 197 // now get slots from the mount points 177 // const std::vector<MountPoint*>::const_iterator it = this->beginMountPoints();178 // std::vector<MountPoint*> list = this->getMountPoints();179 198 std::map<int, MountPoint*>::iterator it = this->mountPointMap.begin(); 180 // PRINTF(0)("\n\n\n\nsize: %i\n", this->mountPointMap.size());181 199 for( ;it != this->mountPointMap.end(); it++) 182 200 { 183 PRINTF(0)("5555555555 this npc got mountss\n\n\n");184 201 WeaponSlot* ws = dynamic_cast<WeaponSlot*>((*it).second->getMount()); 185 printf("more\n");186 202 if( ws != NULL && ws->isA(WeaponSlot::staticClassID())) 187 203 { 188 //189 PRINTF(0)("5555555555 this npc got slots\n\n\n");190 191 this->getWeaponManager().setSlot Position(ws->getWeaponSlot(), ws->getRelCoor());192 this->getWeaponManager().setSlotDirection(ws->getWeaponSlot(), ws->getRelDir());204 int slot = ws->getWeaponSlot(); 205 int side = ws->getWeaponSide(); 206 this->getWeaponManager().setSlotPosition(slot, ws->getRelCoor()); 207 this->getWeaponManager().setSlotDirection(slot, ws->getRelDir()); 208 PRINTF(0)("setting slot %i\n", slot); 193 209 } 194 210 } 195 196 197 198 this->getWeaponManager().setSlotPosition(0, Vector(-2.6, .1, -3.0));199 this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);200 201 this->getWeaponManager().setSlotPosition(1, Vector(-2.6, .1, 3.0));202 this->getWeaponManager().setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);203 204 this->getWeaponManager().setSlotPosition(2, Vector(-1.5, .5, -.5));205 this->getWeaponManager().setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0)));206 207 this->getWeaponManager().setSlotPosition(3, Vector(-1.5, .5, .5));208 this->getWeaponManager().setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0)));209 210 this->getWeaponManager().setSlotPosition(4, Vector(-1.5, -.5, .5));211 this->getWeaponManager().setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0)));212 213 this->getWeaponManager().setSlotPosition(5, Vector(-1.5, -.5, -.5));214 this->getWeaponManager().setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));215 216 this->getWeaponManager().setSlotPosition(6, Vector(-1, 0.0, 0));217 this->getWeaponManager().setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);218 211 219 212 this->getWeaponManager().getFixedTarget()->setParent(this); 220 213 this->getWeaponManager().getFixedTarget()->setRelCoor(100000,0,0); 221 222 223 224 225 214 } 226 215
Note: See TracChangeset
for help on using the changeset viewer.