Changeset 8560
- Timestamp:
- May 24, 2011, 4:33:48 PM (14 years ago)
- Location:
- code/branches/dockingsystem2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/dockingsystem2/data/levels/docking.oxw
r8544 r8560 1 1 <LevelInfo 2 2 name = "Transporter" 3 description = "Level with a Transporter. Demo strates the docking system."3 description = "Level with a Transporter. Demonstrates the docking system." 4 4 tags = "" 5 5 /> … … 26 26 27 27 <Light type="directional" position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" /> 28 29 30 28 31 29 <?lua for i = 1, 10, 1 do ?> … … 113 111 </events> 114 112 <attached> 115 <DistanceTrigger position="0,0, 0" distance="30" target="Pawn" beaconMode="exclude" targetname="bcnDestroyer" name="dockMe" />116 <Billboard material="Examples/Flare" colour="1.0, 0, 0" />113 <DistanceTrigger position="0,0,-200" distance="30" target="Pawn" beaconMode="exclude" targetname="bcnDestroyer" name="dockMe" /> 114 <Billboard position="0,0,-200" material="Examples/Flare" colour="1.0, 0, 0" /> 117 115 </attached> 118 116 </Dock> -
code/branches/dockingsystem2/src/modules/docking/Dock.cc
r8501 r8560 29 29 /** 30 30 @file Dock.cc 31 31 @brief Docking system main class 32 32 */ 33 33 … … 90 90 { 91 91 if(!pTrigger->isForPlayer()) { // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one. 92 COUT( 2) << "Docking:execute PlayerTrigger was not triggered by a player.." << std::endl;92 COUT(4) << "Docking:execute PlayerTrigger was not triggered by a player.." << std::endl; 93 93 return false; 94 94 } … … 97 97 else 98 98 { 99 COUT( 2) << "Docking::execute Not a player trigger, can't extract pawn from it.." << std::endl;99 COUT(4) << "Docking::execute Not a player trigger, can't extract pawn from it.." << std::endl; 100 100 return false; 101 101 } 102 102 if(pawn == NULL) 103 103 { 104 COUT( 2) << "Docking::execute Can't retrieve Pawn from Trigger. (" << trigger->getIdentifier()->getName() << ")" << std::endl;104 COUT(4) << "Docking::execute Can't retrieve Pawn from Trigger. (" << trigger->getIdentifier()->getName() << ")" << std::endl; 105 105 return false; 106 106 } … … 158 158 if(candidates.find(player) == candidates.end()) 159 159 { 160 COUT( 0) << "Dock::dock Player is not a candidate!" << std::endl;160 COUT(2) << "Dock::dock Player is not a candidate!" << std::endl; 161 161 return false; 162 162 } … … 177 177 if(docked.find(player) == docked.end()) 178 178 { 179 COUT( 0) << "Dock::dockingAnimationFinished Player is not currently docked." << std::endl;179 COUT(2) << "Dock::dockingAnimationFinished Player is not currently docked." << std::endl; 180 180 return false; 181 181 } … … 190 190 if(docked.find(player) == docked.end()) 191 191 { 192 COUT( 0) << "Dock::undock Player is not docked to this Dock." << std::endl;192 COUT(2) << "Dock::undock Player is not docked to this Dock." << std::endl; 193 193 return false; 194 194 } … … 208 208 209 209 bool Dock::undockingAnimationFinished(PlayerInfo* player) { 210 COUT( 0) << "Dock::undockingAnimationFinished executed" << std::endl;210 COUT(4) << "Dock::undockingAnimationFinished executed" << std::endl; 211 211 return true; 212 212 } -
code/branches/dockingsystem2/src/modules/docking/DockToShip.cc
r8501 r8560 43 43 { 44 44 RegisterObject(DockToShip); 45 COUT( 0) << "DockToShip instance created.." << endl;45 COUT(4) << "DockToShip instance created.." << endl; 46 46 } 47 47 … … 69 69 bool DockToShip::docking(PlayerInfo* player) 70 70 { 71 COUT( 0) << "DockToShip::attach" << endl;71 COUT(4) << "DockToShip::attach" << endl; 72 72 73 73 DockingTarget *target = DockingEffect::findTarget(this->target); … … 79 79 ControllableEntity *dockTo = (ControllableEntity*) target->getParent(); 80 80 if (dockTo == NULL) { 81 COUT( 0) << "Parent is not a ControllableEntity.." << std::endl;81 COUT(2) << "Parent is not a ControllableEntity.." << std::endl; 82 82 return false; 83 83 } … … 92 92 bool DockToShip::release(PlayerInfo* player) 93 93 { 94 COUT( 0) << "DockToShip::release" << endl;94 COUT(4) << "DockToShip::release" << endl; 95 95 96 96 player->stopTemporaryControl(); -
code/branches/dockingsystem2/src/modules/docking/DockingController.cc
r8544 r8560 93 93 if (docking) 94 94 { 95 COUT( 0) << "DockingController::takeControl Taking over control." << std::endl;95 COUT(4) << "DockingController::takeControl Taking over control." << std::endl; 96 96 97 97 entity->setDestroyWhenPlayerLeft(false); … … 104 104 void DockingController::positionReached() 105 105 { 106 COUT( 0) << "DockingController::positionReached() called." << std::endl;106 COUT(4) << "DockingController::positionReached() called." << std::endl; 107 107 108 108 assert(this->player); … … 110 110 111 111 // stop spaceship 112 dock->attach(entity);112 entity->setPosition(dock->getWorldPosition()); 113 113 entity->setVelocity(0, 0, 0); 114 entity->setOrientation(dock->get Orientation());114 entity->setOrientation(dock->getWorldOrientation()); 115 115 116 116 // give control back to player -
code/branches/dockingsystem2/src/modules/docking/DockingTarget.cc
r8501 r8560 29 29 /** 30 30 @file DockingTarget.cc 31 31 @brief Docking system main class 32 32 */ 33 33 … … 55 55 XMLPortParam(DockingTarget, "name", setName, getName, xmlelement, mode); 56 56 57 COUT( 0) << "DockingTarget with name '" << this->getName() << "' created.." << std::endl;57 COUT(4) << "DockingTarget with name '" << this->getName() << "' created.." << std::endl; 58 58 } 59 59
Note: See TracChangeset
for help on using the changeset viewer.