- Timestamp:
- Jan 17, 2016, 2:58:59 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v3/src/orxonox/controllers/SectionController.cc
r11065 r11067 174 174 this->setFormationMode( this->myDivisionLeader_->getFormationMode() ); 175 175 this->spread_ = this->myDivisionLeader_->getSpread(); 176 Vector3* targetRelativePosition;177 176 switch (this->formationMode_){ 178 177 case FormationMode::WALL: 179 { 180 targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, 0); 181 break; 182 } 178 return Vector3 (-2.0f*this->spread_, 0, 0); 179 183 180 case FormationMode::FINGER4: 184 { 185 targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, 1.0f*this->spread_); 186 break; 187 } 181 return Vector3 (-2.0f*this->spread_, 0, 1.0f*this->spread_); 188 182 189 183 case FormationMode::DIAMOND: 190 { 191 targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, 1.0f*this->spread_); 192 break; 193 } 194 } 195 Vector3 result = *targetRelativePosition; 196 delete targetRelativePosition; 197 return result; 184 return Vector3 (-2.0f*this->spread_, 0, 1.0f*this->spread_); 185 186 default: 187 return Vector3::ZERO; 188 } 198 189 } 199 190
Note: See TracChangeset
for help on using the changeset viewer.