From d5b69e209b462577e048e3fb93c2e9fe3266f5f9 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 6 Jan 2013 21:08:34 +0000 Subject: Increased projectile size to 0.025f. --- src/core/entityprojectile.cc | 4 ++-- src/core/entityprojectile.h | 2 ++ src/game/base/ship.cc | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/entityprojectile.cc b/src/core/entityprojectile.cc index 0a4e081..108d347 100644 --- a/src/core/entityprojectile.cc +++ b/src/core/entityprojectile.cc @@ -19,7 +19,7 @@ EntityProjectile::EntityProjectile(const Entity *spawn) : EntityDynamic() set_label("projectile"); set_flag(Entity::KeepAlive); set_shape(Entity::Sphere); - set_radius(0.01f); + set_radius(PROJECTILE_RADIUS); set_mass(radius()); projectile_damage = 0.0f; @@ -38,7 +38,7 @@ EntityProjectile::EntityProjectile(std::istream & is) : EntityDynamic(is) set_label("projectile"); set_flag(Entity::KeepAlive); set_shape(Entity::Sphere); - set_radius(0.01f); + set_radius(PROJECTILE_RADIUS); set_mass(radius()); projectile_damage = 0.0f; diff --git a/src/core/entityprojectile.h b/src/core/entityprojectile.h index 2651203..932b082 100644 --- a/src/core/entityprojectile.h +++ b/src/core/entityprojectile.h @@ -12,6 +12,8 @@ namespace core { +const float PROJECTILE_RADIUS = 0.025f; + class EntityProjectile : public core::EntityDynamic { public: diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc index 7ce6d36..e5a5a15 100644 --- a/src/game/base/ship.cc +++ b/src/game/base/ship.cc @@ -928,7 +928,7 @@ void Ship::frame(const unsigned long elapsed) } else if ((weapon->projectile_interval() > 0) && (slot->last_fired() + weapon->projectile_interval() <= core::server()->timestamp())) { // aim - const float projectile_radius = 0.01f; // FIXME this should be defined somewhere + const float projectile_radius = core::PROJECTILE_RADIUS; // FIXME this should be defined somewhere math::Axis projectile_axis(axis() * slot->axis()); math::Vector3f projectile_location(location() + (axis() * slot->location() * modelscale) + projectile_axis.forward() * projectile_radius); -- cgit v1.2.3