- Timestamp:
- May 9, 2019, 1:56:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12349 r12350 225 225 226 226 this->activeWalls_.push_back(this->futureWall_); 227 228 229 for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++) 227 for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++) { 228 if (this->futureWall_->getStone(i) == nullptr) { 229 orxout() << "Added nullptr to std::list stones_" << endl; 230 } 231 230 232 this->stones_.push_back(this->futureWall_->getStone(i)); 233 } 231 234 //new location of ship 232 235 //new amount of balls … … 235 238 } 236 239 237 void OrxoBlox::createWall( void){240 void OrxoBlox::createWall(){ 238 241 this->futureWall_ = new OrxoBloxWall(this->center_->getContext()); 239 242 // Apply the stone template to the stone. … … 258 261 } 259 262 260 /*OrxoBloxStones* OrxoBlox::CheckForCollision(OrxoBloxBall* Ball) {263 OrxoBloxStones* OrxoBlox::CheckForCollision(OrxoBloxBall* Ball) { 261 264 262 265 orxout() << "Checking for Collision" << endl; … … 264 267 for(OrxoBloxStones* someStone : this->stones_) 265 268 { 269 if(someStone == nullptr) 270 { 271 continue; 272 } 266 273 orxout() << "Checking a stone" << endl; 267 274 const Vector3& StonePosition = someStone->getPosition(); //!< Saves the position of the currentStone 268 275 int size = someStone->getSize(); 269 if((BallPosition.x >= StonePosition.x - size && BallPosition.x <= StonePosition.x + size) ||276 if((BallPosition.x >= StonePosition.x - size && BallPosition.x <= StonePosition.x + size) && 270 277 (BallPosition.z >= StonePosition.z - size && BallPosition.z <= StonePosition.z + size)) { 271 278 orxout() << "FOUND ONE" << endl; … … 275 282 orxout() << "Found nothing...." << endl; 276 283 return nullptr; 277 } */284 } 278 285 279 286 }
Note: See TracChangeset
for help on using the changeset viewer.