Changeset 9207 in orxonox.OLD
- Timestamp:
- Jul 5, 2006, 10:53:55 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/creatures/fps_player.cc
r9194 r9207 135 135 136 136 this->getWeaponManager().setSlotCount(2); 137 // this->getWeaponManager().setSlotDirection(0, Quaternion(M_PI_2, Vector(0,1,0)));137 this->getWeaponManager().setSlotDirection(0, Quaternion(M_PI_4*-0.55f, Vector(0,0,1))); 138 138 this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 139 139 this->getWeaponManager().setSlotDirection(1, Quaternion(M_PI_4*.5, Vector(1,0,0))); … … 141 141 this->getWeaponManager().setSlotPosition(1, Vector(5.0, 0.0, 0.0)); 142 142 143 // this->getWeaponManager().getFixedTarget()->setRelDir(Quaternion(M_PI_4*-0.6f, Vector(0,0,1))); 144 143 145 144 146 this->getWeaponManager().setParentNode(&this->cameraNode); … … 149 151 150 152 this->aimingSystem = new AimingSystem(this); 151 this->addChild(this->aimingSystem); 152 153 //this->addChild(this->aimingSystem); 154 wpRight->addChild(this->aimingSystem); 155 // this->getWeaponManager().sl 153 156 154 157 … … 233 236 this->initWeapon = true; 234 237 235 State::getCameraNode()->setParentMode(PNODE_ROTATE_AND_MOVE);238 this->cameraNode.setParentMode(PNODE_ROTATE_AND_MOVE); 236 239 237 240 this->getWeaponManager().getParentNode()->setParentMode(PNODE_ROTATE_AND_MOVE); … … 242 245 this->aimingSystem->toList(OM_GROUP_01); 243 246 this->aimingSystem->setParent(&this->cameraNode); 244 this->aimingSystem->setParentMode(PNODE_ROTATE_AND_MOVE); 247 // this->aimingSystem->setParentMode(PNODE_ROTATE_AND_MOVE); 248 this->aimingSystem->setRelDir(Quaternion(M_PI_4*-0.55f, Vector(0,0,1))); 249 this->aimingSystem->setRelCoor(0, -1, -1); 245 250 246 251 … … 248 253 if( box != NULL) 249 254 { 250 float f = 1.3f;251 State::getCameraNode()->setRelCoor(0, box->halfLength[1] * f, 0);252 State::getCameraTargetNode()->setRelCoor(10, box->halfLength[1] * f, 0);253 254 this->getWeaponManager().setSlotPosition(0, Vector( 1.5, box->halfLength[1] * f - 0.7, 1.1));255 float f = 0.2f; 256 this->cameraNode.setRelCoor(0, box->halfLength[1] * f, 0); 257 this->cameraNode.setRelCoor(10, box->halfLength[1] * f, 0); 258 259 this->getWeaponManager().setSlotPosition(0, Vector(-8.0, box->halfLength[1] * f - 1.5, 1.1)); 255 260 this->getWeaponManager().setSlotPosition(1, Vector(5.0, box->halfLength[1] * f, 0.0)); 256 261 } … … 266 271 if( this->bFire) 267 272 { 268 //this->getWeaponManager().fire();273 this->getWeaponManager().fire(); 269 274 270 275 WorldEntity* target = this->aimingSystem->getNearestTarget(); … … 291 296 292 297 293 if ( attitude > 0.32 ) 294 attitude = 0.32; 295 296 else if ( attitude < -2.1 ) 297 attitude = -2.1; 298 if ( attitude > 1.95 ) 299 attitude = 1.95; 300 else if ( attitude < -1.07 ) 301 attitude = -1.07; 298 302 299 303 xMouse = yMouse = 0;
Note: See TracChangeset
for help on using the changeset viewer.