Changeset 10237 in orxonox.OLD for branches/playability/src/world_entities/space_ships/space_ship.cc
- Timestamp:
- Jan 15, 2007, 11:51:37 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/space_ships/space_ship.cc
r10235 r10237 58 58 #include "state.h" 59 59 #include "player.h" 60 #include "camera.h" 60 61 61 62 … … 436 437 this->toList( OM_GROUP_00); 437 438 State::getPlayer()->hud().setOverlayActive(false); 439 State::getCamera()->setEventHandling(true); 438 440 //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( false); 439 441 //this->detachCamera(); … … 619 621 this->previousWeaponConfig(); 620 622 623 if (!(State::getCamera()->getEventHandling())) 624 { 625 if( event.type == KeyMapper::PEV_VIEW0) 626 { 627 State::getCamera()->setViewMode(Camera::ViewNormal); 628 State::getCameraTargetNode()->setParent(this); 629 State::getCamera()->setParent(this); 630 } 631 else if( event.type == KeyMapper::PEV_VIEW1) 632 { 633 State::getCamera()->setViewMode(Camera::ViewBehind); 634 State::getCameraTargetNode()->setParent(this); 635 State::getCamera()->setParent(this); 636 } 637 else if( event.type == KeyMapper::PEV_VIEW2) 638 { 639 State::getCamera()->setViewMode(Camera::ViewFront); 640 State::getCameraTargetNode()->setParent(this); 641 State::getCamera()->setParent(this); 642 } 643 else if( event.type == KeyMapper::PEV_VIEW3) 644 { 645 State::getCamera()->setViewMode(Camera::ViewLeft); 646 State::getCameraTargetNode()->setParent(this); 647 State::getCamera()->setParent(this); 648 } 649 else if( event.type == KeyMapper::PEV_VIEW4) 650 { 651 State::getCamera()->setViewMode(Camera::ViewRight); 652 State::getCameraTargetNode()->setParent(this); 653 State::getCamera()->setParent(this); 654 } 655 else if( event.type == KeyMapper::PEV_VIEW5) 656 { 657 State::getCamera()->setViewMode(Camera::ViewTop); 658 State::getCameraTargetNode()->setParent(this->travelNode); 659 State::getCamera()->setParent(this->travelNode); 660 } 661 } 662 621 663 622 664 /* … … 837 879 State::getCameraNode()->setParentSoft(this->travelNode); 838 880 //State::getCameraNode()->setParentSoft(this); 839 State::getCameraNode()->setRelCoorSoft(-0.01, 40, 0);881 //State::getCameraNode()->setRelCoorSoft(-0.01, 40, 0); 840 882 State::getCameraTargetNode()->setParentSoft(this->travelNode); 841 883 //State::getCameraTargetNode()->setParentSoft(this); 842 State::getCameraTargetNode()->setRelCoorSoft(0,0,0); 884 //State::getCameraTargetNode()->setRelCoorSoft(0,0,0); 885 this->setCameraMode(Camera::ViewTop); 886 State::getCamera()->setEventHandling(false); 887 registerEvent(KeyMapper::PEV_VIEW0); 888 registerEvent(KeyMapper::PEV_VIEW1); 889 registerEvent(KeyMapper::PEV_VIEW2); 890 registerEvent(KeyMapper::PEV_VIEW3); 891 registerEvent(KeyMapper::PEV_VIEW4); 892 registerEvent(KeyMapper::PEV_VIEW5); 893 894 State::getCamera()->setParentMode(PNODE_MOVEMENT); 843 895 844 896 this->debugNode(1);
Note: See TracChangeset
for help on using the changeset viewer.