Changeset 10707 in orxonox.OLD for branches/presentation/src
- Timestamp:
- Jun 16, 2007, 12:32:59 AM (17 years ago)
- Location:
- branches/presentation/src/world_entities/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/weapons/bsp_weapon.cc
r10705 r10707 157 157 WorldEntity* target = aimingSystem->getNearestTarget(); 158 158 aimingSystem->flushList(); 159 160 bool hit = false;161 159 162 PRINTF(0)(" groups: %d %d %d %d\n", this->getOMListNumber(), this->aimingSystem->getOMListNumber(), OM_GROUP_01, OM_GROUP_00);160 PRINTF(0)("---------------------------------------groups: %d %d %d %d\n", this->getOMListNumber(), this->aimingSystem->getOMListNumber(), OM_GROUP_01, OM_GROUP_00); 163 161 164 162 if ( target == NULL ) … … 172 170 float p = 1 - res*res/range/range; 173 171 if (r < p ){ 174 hit = true;175 172 printf( "HIT %s\n", target->getClassName().c_str() ); 176 173 target->hit( this->damage, this ); … … 180 177 181 178 } 182 else hit = true; 179 else 180 { 181 printf( "HIT %s\n", target->getClassName().c_str() ); 182 target->hit( this->damage, this ); 183 } 183 184 } 184 185 -
branches/presentation/src/world_entities/weapons/weapon.h
r10698 r10707 173 173 bool tickW(float dt); //!< this is a function that must be called by the weaponManager, or any other weaponHandler, all other functions are handled from within 174 174 175 virtual void tick(float dt) { tickW(dt); };175 virtual void tick(float dt) { WorldEntity::tick(dt); tickW(dt); }; 176 176 177 177 bool check() const;
Note: See TracChangeset
for help on using the changeset viewer.