Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/base')
-rw-r--r--src/game/base/game.cc10
-rw-r--r--src/game/base/jumppoint.cc1
-rw-r--r--src/game/base/navpoint.cc1
-rw-r--r--src/game/base/planet.cc2
-rw-r--r--src/game/base/ship.cc10
-rw-r--r--src/game/base/star.cc2
6 files changed, 9 insertions, 17 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index d99f80c..9d2dcd0 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -719,9 +719,9 @@ void Game::func_launch(core::Player *player, std::string const &args)
Ship *ship = static_cast<Ship *>(player->control());
if (dock->type() == core::Entity::Globe)
- ship->get_location().assign(dock->location() + (dock->axis().forward() *(planet_safe_distance + ship->radius() + dock->radius())));
+ ship->get_location().assign(dock->location() + (dock->axis().forward() * (planet_safe_distance + ship->radius() + dock->radius())));
else
- ship->get_location().assign(dock->location() + (dock->axis().forward() *(ship->radius() + dock->radius())));
+ ship->get_location().assign(dock->location() + (dock->axis().forward() * (ship->radius() + dock->radius())));
ship->get_axis().assign(dock->axis());
ship->set_state(core::Entity::Normal);
@@ -1065,7 +1065,6 @@ bool Game::load_zone(core::Zone *zone)
} else if (zoneini.got_section("entity")) {
entity = new core::Entity();
- entity->set_flag(core::Entity::Static);
entity->set_zone(zone);
count ++;
@@ -1268,11 +1267,9 @@ bool Game::load_zone(core::Zone *zone)
}
}
}
+
zoneini.close();
-
con_debug << " " << zoneini.name() << " " << zone->content().size() << " entities" << std::endl;
-
-
return true;
}
@@ -1290,7 +1287,6 @@ bool Game::validate_zone(core::Zone *zone)
// validate jump gate
JumpGate *jumpgate = static_cast<JumpGate *>(entity);
jumpgate->validate();
-
} else {
if ((entity->flags() & core::Entity::Dockable) == core::Entity::Dockable) {
generate_entity_menus(entity);
diff --git a/src/game/base/jumppoint.cc b/src/game/base/jumppoint.cc
index 283b607..5b9a75f 100644
--- a/src/game/base/jumppoint.cc
+++ b/src/game/base/jumppoint.cc
@@ -18,7 +18,6 @@ JumpPoint::JumpPoint() : core::EntityDynamic()
get_color().assign(0.0f, 0.8f, 0.8f, 1.0f);
get_color_second().assign(0.6f, 1.0f);
set_radius(0.25f);
- set_flag(core::Entity::Static);
set_flag(core::Entity::Bright);
// FIXME jumppoints should be harder to find
set_flag(core::Entity::ShowOnMap);
diff --git a/src/game/base/navpoint.cc b/src/game/base/navpoint.cc
index 7d0d75c..650473b 100644
--- a/src/game/base/navpoint.cc
+++ b/src/game/base/navpoint.cc
@@ -16,7 +16,6 @@ NavPoint::NavPoint() : core::Entity()
get_color().assign(1.0f, 1.0f);
get_color_second().assign(0.6f, 1.0f);
set_radius(0.25f);
- set_flag(core::Entity::Static);
set_flag(core::Entity::Bright);
//set_flag(core::Entity::ShowOnMap);
diff --git a/src/game/base/planet.cc b/src/game/base/planet.cc
index 1e280c7..8723af4 100644
--- a/src/game/base/planet.cc
+++ b/src/game/base/planet.cc
@@ -14,8 +14,6 @@ namespace game
Planet::Planet() : core::EntityGlobe()
{
set_flag(core::Entity::ShowOnMap);
- set_flag(core::Entity::Static);
- set_flag(core::Entity::Solid);
get_color().assign(1.0f, 1.0f); // white
set_radius(64.0f); // 64 game units
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc
index d426a0d..0ac7461 100644
--- a/src/game/base/ship.cc
+++ b/src/game/base/ship.cc
@@ -275,19 +275,21 @@ void Ship::action (btScalar seconds)
{
float maxspeed = 0;
float engine_force = 0;
+ float torque_force = ship_torque_force;
btTransform t;
switch (entity_state) {
case core::Entity::Normal:
engine_force = ship_thrust_force * entity_thrust;
- maxspeed = ship_shipmodel->maxspeed() * entity_thrust;
+ maxspeed = ship_shipmodel->maxspeed() * entity_thrust;
break;
case core::Entity::ImpulseInitiate:
case core::Entity::Impulse:
engine_force = ship_impulse_force;
maxspeed = (Game::g_impulsespeed ? Game::g_impulsespeed->value() * 0.01f : 0.0f);
+ torque_force *= .5f;
break;
case core::Entity::JumpInitiate:
@@ -333,11 +335,11 @@ void Ship::action (btScalar seconds)
}
// apply direction
- body()->applyTorqueImpulse(math::to_btVector3(axis().up() * current_target_direction * ship_torque_force * torque_scale));
+ body()->applyTorqueImpulse(math::to_btVector3(axis().up() * current_target_direction * torque_force * torque_scale));
// apply pitch
- body()->applyTorqueImpulse(math::to_btVector3(axis().left() * -current_target_pitch * ship_torque_force * torque_scale));
+ body()->applyTorqueImpulse(math::to_btVector3(axis().left() * -current_target_pitch * torque_force * torque_scale));
// apply roll
- body()->applyTorqueImpulse(math::to_btVector3(axis().forward() * -current_target_roll * ship_torque_force * roll_scale * torque_scale));
+ body()->applyTorqueImpulse(math::to_btVector3(axis().forward() * -current_target_roll * torque_force * roll_scale * torque_scale));
// limit speed
entity_speed = (float) entity_body->getLinearVelocity().length();
diff --git a/src/game/base/star.cc b/src/game/base/star.cc
index 21fa4af..6327223 100644
--- a/src/game/base/star.cc
+++ b/src/game/base/star.cc
@@ -14,8 +14,6 @@ namespace game
Star::Star() : core::EntityGlobe()
{
set_flag(core::Entity::ShowOnMap);
- set_flag(core::Entity::Static);
- set_flag(core::Entity::Solid);
set_flag(core::Entity::Bright);
get_color().assign(1.0f, 1.0f);