Changeset 9406 in orxonox.OLD for trunk/src/world_entities/playable.cc
- Timestamp:
- Jul 24, 2006, 11:09:47 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/playable.cc
r9235 r9406 148 148 if (weapon != NULL) 149 149 PRINTF(2)("Unable to add Weapon (%s::%s) to %s::%s\n", 150 weapon->getClass Name(), weapon->getName(), this->getClassName(), this->getName());150 weapon->getClassCName(), weapon->getCName(), this->getClassCName(), this->getCName()); 151 151 else 152 152 PRINTF(2)("No weapon defined\n"); … … 361 361 } 362 362 } 363 /**364 * @brief helps us colliding Playables365 * @param entity the Entity to collide366 * @param location where the collision occured.367 */368 void Playable::collidesWith(WorldEntity* entity, const Vector& location)369 {370 if (entity == collider)371 return;372 collider = entity;373 374 if ( entity->isA(CL_PROJECTILE) && ( !State::isOnline() || SharedNetworkData::getInstance()->isGameServer() ) )375 {376 this->decreaseHealth(entity->getHealth() *(float)rand()/(float)RAND_MAX);377 // EXTREME HACK378 if (this->getHealth() <= 0.0f)379 {380 // this->destory();381 382 if( State::getGameRules() != NULL)383 State::getGameRules()->registerKill(Kill(entity, this));384 }385 }386 }387 363 388 364 … … 413 389 } 414 390 this->bDead = true; 415 391 416 392 if( State::getGameRules() != NULL) 417 393 State::getGameRules()->registerKill(Kill(killer, this));
Note: See TracChangeset
for help on using the changeset viewer.