Changeset 8667 for code/branches/presentation/src/modules
- Timestamp:
- May 29, 2011, 6:44:45 PM (14 years ago)
- Location:
- code/branches/presentation/src/modules
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/modules/docking/Dock.cc
r8645 r8667 84 84 { 85 85 PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger); 86 P awn* pawn= NULL;86 PlayerInfo* player = NULL; 87 87 88 88 // Check whether it is a player trigger and extract pawn from it … … 93 93 return false; 94 94 } 95 p awn= pTrigger->getTriggeringPlayer();95 player = pTrigger->getTriggeringPlayer(); 96 96 } 97 97 else … … 100 100 return false; 101 101 } 102 if(pawn == NULL)103 {104 COUT(4) << "Docking::execute Can't retrieve Pawn from Trigger. (" << trigger->getIdentifier()->getName() << ")" << std::endl;105 return false;106 }107 108 // Extract the PlayerInfo from the Pawn.109 PlayerInfo* player = pawn->getPlayer();110 102 if(player == NULL) 111 103 { 112 COUT( 2) << "Docking::execute The PlayerInfo* is NULL." << std::endl;104 COUT(4) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << std::endl; 113 105 return false; 114 106 } -
code/branches/presentation/src/modules/notifications/NotificationDispatcher.cc
r8666 r8667 140 140 141 141 PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger); 142 P awn* pawn= NULL;142 PlayerInfo* player = NULL; 143 143 144 144 // If the trigger is a PlayerTrigger. … … 148 148 return false; 149 149 else 150 p awn= pTrigger->getTriggeringPlayer();150 player = pTrigger->getTriggeringPlayer(); 151 151 } 152 152 else 153 153 return false; 154 154 155 if(p awn== NULL)155 if(player == NULL) 156 156 { 157 157 COUT(4) << "The NotificationDispatcher was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << std::endl; … … 159 159 } 160 160 161 // Extract the PlayerInfo from the Pawn. 162 PlayerInfo* player = pawn->getPlayer(); 163 164 if(player == NULL) 165 { 166 CCOUT(3) << "The PlayerInfo* is NULL." << std::endl; 167 return false; 168 } 169 170 // HACK fix. Resolve this issue another way... 171 if(GameMode::isStandalone()) 172 this->dispatch(0); 173 else 174 this->dispatch(player->getClientID()); 161 this->dispatch(player->getClientID()); 175 162 176 163 return true; -
code/branches/presentation/src/modules/objects/Script.cc
r7493 r8667 140 140 141 141 PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger); 142 P awn* pawn= NULL;142 PlayerInfo* player = NULL; 143 143 144 144 // If the trigger is a PlayerTrigger. … … 148 148 return false; 149 149 else 150 p awn= pTrigger->getTriggeringPlayer();150 player = pTrigger->getTriggeringPlayer(); 151 151 } 152 152 else 153 153 return false; 154 154 155 if(p awn== NULL) //TODO: Will this ever happen? If not, change in NotificationDispatcher as well.155 if(player == NULL) //TODO: Will this ever happen? If not, change in NotificationDispatcher as well. 156 156 { 157 157 COUT(4) << "The Script was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << std::endl; 158 return false;159 }160 161 // Extract the PlayerInfo from the Pawn.162 PlayerInfo* player = pawn->getPlayer();163 164 if(player == NULL)165 {166 COUT(3) << "The PlayerInfo* is NULL." << std::endl;167 158 return false; 168 159 } -
code/branches/presentation/src/modules/objects/triggers/DistanceTrigger.cc
r8637 r8667 205 205 entity = entity->getParent(); 206 206 207 Pawn* player = orxonox_cast<Pawn*>(entity); 208 this->setTriggeringPlayer(player); 207 Pawn* pawn = orxonox_cast<Pawn*>(entity); 208 if(pawn != NULL) 209 this->setTriggeringPawn(pawn); 210 else 211 CCOUT(2) << "Pawn was NULL." << endl; 209 212 } 210 213 -
code/branches/presentation/src/modules/objects/triggers/MultiTriggerContainer.cc
r7601 r8667 73 73 { 74 74 this->setForPlayer(true); 75 this->setTriggeringP layer(pawn);75 this->setTriggeringPawn(pawn); 76 76 } 77 77 } -
code/branches/presentation/src/modules/questsystem/QuestEffectBeacon.cc
r8351 r8667 113 113 114 114 PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger); 115 P awn* pawn= NULL;115 PlayerInfo* player = NULL; 116 116 117 117 // If the trigger is a PlayerTrigger. … … 121 121 return false; 122 122 else 123 p awn= pTrigger->getTriggeringPlayer();123 player = pTrigger->getTriggeringPlayer(); 124 124 } 125 125 else 126 126 return false; 127 127 128 if(p awn== NULL)128 if(player == NULL) 129 129 { 130 130 COUT(4) << "The QuestEffectBeacon was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << std::endl; 131 return false;132 }133 134 // Extract the PlayerInfo from the Pawn.135 PlayerInfo* player = pawn->getPlayer();136 137 if(player == NULL)138 {139 COUT(3) << "The PlayerInfo* is NULL." << std::endl;140 131 return false; 141 132 }
Note: See TracChangeset
for help on using the changeset viewer.