Changeset 10542 in orxonox.OLD for trunk/src/world_entities/npcs
- Timestamp:
- Jan 31, 2007, 5:15:54 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.