Changeset 5357 in orxonox.OLD for trunk/src/world_entities/weapons/weapon.cc
- Timestamp:
- Oct 10, 2005, 9:15:05 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/weapon.cc
r5356 r5357 169 169 void Weapon::prepareProjectiles(unsigned int count) 170 170 { 171 if ( this->projectileFactory != NULL)171 if (likely(this->projectileFactory != NULL)) 172 172 projectileFactory->prepare(count); 173 173 else 174 PRINTF(2)("unable to create %d projectile for Weapon %s \n", count, this->getName());174 PRINTF(2)("unable to create %d projectile for Weapon %s (%s)\n", count, this->getName(), this->getClassName()); 175 175 } 176 176 … … 181 181 Projectile* Weapon::getProjectile() 182 182 { 183 if ( this->projectileFactory)183 if (likely (this->projectileFactory != NULL)) 184 184 return dynamic_cast<Projectile*>(this->projectileFactory->resurrect()); 185 185 else 186 186 { 187 PRINTF(2)("No projectile defined for Weapon %s cant return any\n", this->getName());187 PRINTF(2)("No projectile defined for Weapon %s(%s) cant return any\n", this->getName(), this->getClassName()); 188 188 return NULL; 189 189 }
Note: See TracChangeset
for help on using the changeset viewer.