- Timestamp:
- Feb 4, 2016, 11:54:04 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc
r11099 r11108 54 54 this->bDestroy_ = false; 55 55 56 // Default is destroying the projectile after collision 57 this->destroyAfterCollision_ = true; 58 56 59 // Default damage must be zero, otherwise it would be above zero if no settings are made in the weaponsettings xml file. 57 60 // same thing for all weaponmodes files … … 87 90 return false; 88 91 89 this->bDestroy_ = true; // If something is hit, the object is destroyed and can't hit something else. 90 // The projectile is destroyed by its tick()-function (in the following tick). 92 if (getDestroyAfterCollision()) 93 { 94 this->bDestroy_ = true; // If something is hit, the object is destroyed and can't hit something else. 95 // The projectile is destroyed by its tick()-function (in the following tick). 96 // TODO: Use destroyLater() for this 97 } 91 98 92 99 Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is nullptr
Note: See TracChangeset
for help on using the changeset viewer.