Changeset 10714 in orxonox.OLD for branches/presentation/src/world_entities
- Timestamp:
- Jun 18, 2007, 3:19:15 PM (18 years ago)
- Location:
- branches/presentation/src/world_entities
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/creatures/fps_player.cc
r10711 r10714 304 304 // this->weaponMan.setRelCoor(0, box->halfLength[1] * f, 0); 305 305 // this->cameraNode.setRelCoor(10, box->halfLength[1] * f, 0); 306 float v = 0.1f; 306 // float v = 0.1f; // unused variable 307 307 //this->getWeaponManager().setSlotPosition(0, Vector(-8.0, box->halfLength[1] * v, 1.1)); 308 308 //this->getWeaponManager().setSlotPosition(1, Vector(5.0, box->halfLength[1] * v, 0.0)); -
branches/presentation/src/world_entities/space_ships/space_ship.cc
r10698 r10714 274 274 registerVar( new SynchronizeableBool( &bFire, &bFire, "bSecFire", PERMISSION_OWNER)); 275 275 registerVar( new SynchronizeableVector( &velocity, &velocity, "velocity", PERMISSION_MASTER_SERVER ) ); 276 // registerVar( new SynchronizeableQuaternion( &mouseDir, &mouseDir, "mousedir", PERMISSION_OWNER ) ); 276 277 277 278 //this->airFriction = 0.5f; … … 554 555 void SpaceShip::process(const Event &event) 555 556 { 556 //Playable::process(event);557 // Playable::process(event); 557 558 558 559 if( event.type == KeyMapper::PEV_LEFT) … … 572 573 else if( event.type == KeyMapper::PEV_FIRE2) 573 574 this->bSecFire = event.bPressed; 574 else if( event.type == KeyMapper::PEV_FIRE1) 575 else if( event.type == KeyMapper::PEV_FIRE1){ 576 printf("fireing primary"); 575 577 this->bFire = event.bPressed; 578 } 576 579 else if( event.type == KeyMapper::PEV_NEXT_WEAPON && event.bPressed) 577 580 { … … 580 583 else if ( event.type == KeyMapper::PEV_PREVIOUS_WEAPON && event.bPressed) 581 584 this->previousWeaponConfig(); 582 583 if (!(State::getCamera()->getEventHandling())) 585 else if( event.type == EV_MOUSE_MOTION) 586 { 587 // printf("Spaceship Mouse Motion Event\n"); 588 // dynamic_cast<Crosshair*>(this->weaponMan.getFixedTarget())->process(event); 589 // this->weaponMan.process(event); 590 this->xMouse += event.xRel; 591 this->yMouse += event.yRel; 592 // printf("Mouse Coord: %f, %f\n", this->xMouse, this->yMouse); 593 this->weaponMan.getFixedTarget()->setRelCoor(10000, 4*xMouse, 4*yMouse); 594 } 595 else if (!(State::getCamera()->getEventHandling())) 584 596 { 585 597 //PRINTF(0)("\n\n\n\n\n\n\n\nSETCAMERA %x\n\n\n\n\n\n\n", State::getCamera()); … … 622 634 } 623 635 624 625 /*626 else if( event.type == EV_MOUSE_MOTION)627 {628 629 this->xMouse += event.xRel;630 this->yMouse += event.yRel;631 }632 */633 636 } 634 637 … … 821 824 State::getCamera()->setEventHandling(false); 822 825 823 PRINTF(0)(" \n\n\n\n\n\n\n\nSETCAMERA %x\n\n\n\n\n\n\n", State::getCamera());826 PRINTF(0)("SETCAMERA %x\n", State::getCamera()); 824 827 State::getCamera()->setViewMode(Camera::ViewNormal); 825 828 State::getCameraTargetNode()->setParent(this); -
branches/presentation/src/world_entities/space_ships/space_ship.h
r10698 r10714 168 168 bool bInit; //!< set true, if MP have been loaded 169 169 170 /* 170 171 171 float xMouse; //!< mouse moved in x-Direction 172 172 float yMouse; //!< mouse moved in y-Direction 173 173 float mouseSensitivity; //!< the mouse sensitivity 174 int yInvert;175 int controlVelocityX;176 int controlVelocityY;177 */ 174 // int yInvert; 175 // int controlVelocityX; 176 // int controlVelocityY; 177 178 178 179 179 Vector velocity; //!< the velocity of the player. … … 199 199 void setCameraFovy(float fovy); 200 200 201 /* 201 202 202 Quaternion mouseDir; //!< the direction where the player wants to fly 203 Quaternion oldMouseDir; //!< the direction where the player wanted to fly203 /*Quaternion oldMouseDir; //!< the direction where the player wanted to fly 204 204 float shipInertia; //!< the inertia of the ship(how fast the ship reacts to a mouse input) 205 205 Quaternion rotQuat; -
branches/presentation/src/world_entities/weapons/crosshair.cc
r10317 r10714 115 115 if (event.type == EV_MOUSE_MOTION) 116 116 { 117 //this->setAbsCoor2D(event.x, event.y); 117 printf("Processing Crosshair Mouse Event\n"); 118 this->setAbsCoor2D(event.x, event.y); 118 119 } 119 120 } -
branches/presentation/src/world_entities/weapons/rf_cannon.cc
r10702 r10714 138 138 139 139 pj->setAbsCoor(this->emissionPoint[this->activeBarrel]->getAbsCoor()); 140 pj->setAbsDir(this->getAbsDir()); 140 // pj->setAbsDir(this->getAbsDir()); 141 // pj->setAbsDir(Quaternion(0, dynamic_cast<WeaponManager*>(this->getParent())->getFixedTarget()->getAbsCoor() - this->getParent()->getAbsCoor())); 141 142 pj->activate(); 142 143 -
branches/presentation/src/world_entities/weapons/weapon_manager.cc
r10698 r10714 630 630 } 631 631 632 632 /** 633 * processes the input 634 * @param event the Event coming as input 635 */ 636 // void WeaponManager::process(const Event &event) 637 // { 638 // if (event.type == EV_MOUSE_MOTION) 639 // { 640 // this->crosshair->process(event); 641 // // this->setAbsCoor2D(event.x, event.y); 642 // } 643 // } -
branches/presentation/src/world_entities/weapons/weapon_manager.h
r10698 r10714 55 55 void hideCrosshair(); 56 56 void setRotationSpeed(float speed); 57 // Crosshair* getCrosshair() {return this->crosshair; }; 58 59 // virtual void process(const Event &event); 57 60 58 61 void setSlotCount(unsigned int slotCount); -
branches/presentation/src/world_entities/world_entity.cc
r10710 r10714 347 347 348 348 // extract the mount points 349 // Patrick: they get extracted automaticaly now within the model finalization process 350 /* 351 349 352 if(model != NULL) 350 353 model->extractMountPoints(); … … 353 356 PRINTF(0)("Worldentity %s has no mount points", (this->getName()).c_str()); 354 357 return; 355 } 358 }*/ 356 359 357 360 // first get all mount points from the model
Note: See TracChangeset
for help on using the changeset viewer.