Changeset 10919 for code/branches/cpp11_v2/src/modules/jump
- Timestamp:
- Dec 5, 2015, 10:47:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/modules/jump/JumpProjectile.cc
r10768 r10919 69 69 Vector3 projectilePosition = getPosition(); 70 70 71 for ( ObjectList<JumpEnemy>::iterator it = ObjectList<JumpEnemy>::begin(); it != ObjectList<JumpEnemy>::end(); ++it)71 for (JumpEnemy* enemy : ObjectList<JumpEnemy>()) 72 72 { 73 Vector3 enemyPosition = it->getPosition();74 float enemyWidth = it->getWidth();75 float enemyHeight = it->getHeight();73 Vector3 enemyPosition = enemy->getPosition(); 74 float enemyWidth = enemy->getWidth(); 75 float enemyHeight = enemy->getHeight(); 76 76 77 77 if(projectilePosition.x > enemyPosition.x-enemyWidth && projectilePosition.x < enemyPosition.x+enemyWidth && projectilePosition.z > enemyPosition.z-enemyHeight && projectilePosition.z < enemyPosition.z+enemyHeight) 78 78 { 79 it->dead_ = true;79 enemy->dead_ = true; 80 80 } 81 81 }
Note: See TracChangeset
for help on using the changeset viewer.