Changeset 9789 for code/branches/spacestationentry/src
- Timestamp:
- Nov 18, 2013, 4:05:55 PM (11 years ago)
- Location:
- code/branches/spacestationentry/src/modules/docking
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spacestationentry/src/modules/docking/Dock.cc
r9667 r9789 69 69 XMLPortObject(Dock, DockingAnimation, "animations", addAnimation, getAnimation, xmlelement, mode); 70 70 XMLPortEventSink(Dock, BaseObject, "execute", execute, xmlelement, mode); 71 71 72 } 72 73 … … 76 77 77 78 XMLPortEventSink(Dock, BaseObject, "execute", execute, xmlelement, mode); 79 80 // XMLPortEventSink(Dock, BaseObject, "execute2", execute2, xmlelement, mode); 78 81 } 79 82 … … 120 123 } 121 124 125 /*bool Dock::execute2(bool bTriggered, BaseObject* trigger) 126 { 127 orxout(user_warning)<<"execute2"<<endl; 128 PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger); 129 PlayerInfo* player = NULL; 130 131 // Check whether it is a player trigger and extract pawn from it 132 if(pTrigger != NULL) 133 { 134 if(!pTrigger->isForPlayer()) { // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one. 135 orxout(verbose, context::docking) << "Docking:execute PlayerTrigger was not triggered by a player.." << endl; 136 return false; 137 } 138 player = pTrigger->getTriggeringPlayer(); 139 } 140 else 141 { 142 orxout(verbose, context::docking) << "Docking::execute Not a player trigger, can't extract pawn from it.." << endl; 143 return false; 144 } 145 if(player == NULL) 146 { 147 orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl; 148 return false; 149 } 150 151 if(bTriggered) 152 { 153 // Add player to this Docks candidates 154 docked_.insert(player); 155 156 // Show docking dialog 157 this->showDockingDialogHelper(player); 158 } 159 else 160 { 161 // Remove player from candidates list 162 docked_.erase(player); 163 } 164 165 return true; 166 } 167 168 */ 122 169 void Dock::showDockingDialogHelper(PlayerInfo* player) 123 170 { … … 177 224 if (animations_.empty()) 178 225 return dockingAnimationFinished(player); 226 179 227 else 180 228 DockingAnimation::invokeAnimation(true, player, animations_); -
code/branches/spacestationentry/src/modules/docking/Dock.h
r9667 r9789 62 62 // Trigger interface 63 63 bool execute(bool bTriggered, BaseObject* trigger); 64 // bool execute2(bool bTriggered, BaseObject* trigger); 64 65 65 66 // XML interface
Note: See TracChangeset
for help on using the changeset viewer.