Changeset 11974 for code/branches/ScriptableController_FS18/src/orxonox/scriptablecontroller/scriptable_controller.cc
- Timestamp:
- May 17, 2018, 4:04:14 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ScriptableController_FS18/src/orxonox/scriptablecontroller/scriptable_controller.cc
r11861 r11974 133 133 Pawn *ScriptableController::getPawnByID(std::string id) const 134 134 { 135 if(id == "player" || id == "Player" || id == "PLAYER") 135 if(id == "player" || id == "Player" || id == "PLAYER") { 136 136 return orxonox_cast<Pawn*>(this->player_->getControllableEntity()); 137 orxout(user_status) << "Pawn is player!?" << std::endl; 138 } 139 137 140 138 141 auto pawn = this->pawns_.find(id); 142 143 if(pawn != this->pawns_.end()) { 144 orxout(user_status) << "Requested Pawn is available!" << std::endl; 145 } 146 139 147 return pawn != this->pawns_.end() ? pawn->second : nullptr; 140 148 }
Note: See TracChangeset
for help on using the changeset viewer.