Changeset 5357 in orxonox.OLD for trunk/src/world_entities/weapons
- Timestamp:
- Oct 10, 2005, 9:15:05 PM (19 years ago)
- Location:
- trunk/src/world_entities/weapons
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/crosshair.cc
r5280 r5357 14 14 */ 15 15 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON 17 17 18 18 #include "crosshair.h" -
trunk/src/world_entities/weapons/projectile.cc
r5063 r5357 15 15 co-programmer: 16 16 */ 17 17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON 18 18 19 19 #include "projectile.h" -
trunk/src/world_entities/weapons/test_bullet.cc
r5257 r5357 15 15 co-programmer: 16 16 */ 17 17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON 18 18 19 19 #include "test_bullet.h" -
trunk/src/world_entities/weapons/test_gun.cc
r5356 r5357 19 19 @todo: a target to set/hit 20 20 */ 21 21 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON 22 22 23 23 #include "test_gun.h" -
trunk/src/world_entities/weapons/turret.cc
r5356 r5357 13 13 co-programmer: 14 14 */ 15 15 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON 16 16 17 17 #include "turret.h" -
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.