Changeset 646 for code/branches/FICN/src/orxonox/objects/Projectile.cc
- Timestamp:
- Dec 19, 2007, 5:04:07 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/objects/Projectile.cc
r644 r646 1 1 #include "Projectile.h" 2 2 #include "../core/CoreIncludes.h" 3 #include "Explosion.h" 4 #include "Model.h" 3 5 4 6 namespace orxonox … … 35 37 } 36 38 39 void Projectile::tick(float dt) 40 { 41 WorldEntity::tick(dt); 42 43 float radius; 44 for (Iterator<Model> it = ObjectList<Model>::start(); it; ++it) 45 { 46 if ((*it) != this->owner_) 47 { 48 radius = it->getScale().x * 3.0; 49 50 if (this->getPosition().squaredDistance(it->getPosition()) <= (radius*radius)) 51 { 52 Explosion* eplosion = new Explosion(this); 53 delete this; 54 return; 55 } 56 } 57 } 58 } 59 37 60 void Projectile::destroyObject() 38 61 {
Note: See TracChangeset
for help on using the changeset viewer.