diff options
Diffstat (limited to 'src/game/base')
-rw-r--r-- | src/game/base/ship.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc index a927e73..676ba65 100644 --- a/src/game/base/ship.cc +++ b/src/game/base/ship.cc @@ -522,7 +522,24 @@ void Ship::collision(core::Entity *other) ship_armor = 0; std::string message("^B"); message.append(owner()->name()); - message.append(" ^Bwas blown to bits."); + + core::Player *assassin = 0; + + if (projectile->ownerid()) { + assassin = core::server()->find_player(projectile->ownerid()); + } + + if (assassin) { + if (assassin == owner()) { + message.append(" ^Bate his own bullet."); + } else { + message.append(" ^Bwas blown to bits by "); + message.append(assassin->name()); + } + } else { + message.append(" ^Bwas blown to bits."); + } + core::server()->broadcast(message); } else { die(); } @@ -842,6 +859,7 @@ void Ship::frame(const unsigned long elapsed) (*it)->set_last_fired(core::server()->timestamp()); Projectile * projectile = new Projectile((*it)->lifespan()); projectile->set_damage(10.0f); + projectile->set_color(color()); projectile->set_zone(zone()); projectile->set_axis(axis() * (*it)->axis()); projectile->set_location(location() + (axis() * (*it)->location() * modelscale) + projectile->axis().forward() * projectile->radius()); |