- Timestamp:
- May 9, 2019, 3:32:40 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12359 r12360 242 242 this->stones_.push_back(this->futureWall_->getStone(i)); 243 243 } 244 245 for(OrxoBloxWall* wall : this->activeWalls_) { 246 if(wall->isEmpty()) { 247 wall->destroy(); 248 } 249 int NumberOfStones = 0; 250 for(int i = 0; i < 10; i++) { 251 if(wall->getStone(i) == nullptr) { 252 continue; 253 } 254 else { 255 NumberOfStones++; 256 } 257 258 } 259 } 244 260 //new location of ship 245 261 //new amount of balls … … 283 299 orxout() << "Checking a stone" << endl; 284 300 const Vector3& StonePosition = someStone->getPosition(); //!< Saves the position of the currentStone 285 int size = someStone->getSize() ;286 if((BallPosition.x >= StonePosition.x - size && BallPosition.x<= StonePosition.x + size) &&287 (BallPosition.z >= StonePosition.z - size && BallPosition.z<= StonePosition.z + size)) {301 int size = someStone->getSize()/2; 302 if((BallPosition.x - Ball->getRadius() >= StonePosition.x - size && BallPosition.x + Ball->getRadius() <= StonePosition.x + size) && 303 (BallPosition.z - Ball->getRadius() >= StonePosition.z - size && BallPosition.z + Ball->getRadius() <= StonePosition.z + size)) { 288 304 orxout() << "FOUND ONE" << endl; 289 305 return someStone;
Note: See TracChangeset
for help on using the changeset viewer.