diff options
author | Stijn Buys <ingar@osirion.org> | 2011-07-12 14:26:09 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2011-07-12 14:26:09 +0000 |
commit | 8c3abbb3c04c6119b8f0ceb546c3aff66703ba14 (patch) | |
tree | 975ff9f73ef7841763111a0e0dc7065e34e3cbf7 /src/game/base | |
parent | bbbd41ccf4e7501e93689afecab442cb7e60a5de (diff) |
Removed Entity::Complex flag: collision models will be used if availble,
removed a number of irrelevant comments.
Diffstat (limited to 'src/game/base')
-rw-r--r-- | src/game/base/game.cc | 12 | ||||
-rw-r--r-- | src/game/base/jumppoint.cc | 2 | ||||
-rw-r--r-- | src/game/base/racetrack.cc | 3 | ||||
-rw-r--r-- | src/game/base/shipmodel.cc | 7 | ||||
-rw-r--r-- | src/game/base/shipmodel.h | 14 |
5 files changed, 10 insertions, 28 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc index 5639e20..2d25993 100644 --- a/src/game/base/game.cc +++ b/src/game/base/game.cc @@ -1160,6 +1160,7 @@ bool Game::load_zone(core::Zone *zone) jumppoint = new JumpGate(); entity = jumppoint; jumppoint->set_zone(zone); + jumppoint->set_radius(0); count ++; } else if (zoneini.got_section("jumppoint")) { @@ -1175,12 +1176,16 @@ bool Game::load_zone(core::Zone *zone) racetrack->set_radius(0); } else if (zoneini.got_section("checkpoint")) { - checkpoint = new CheckPoint(racetrack); - entity = checkpoint; + if (!racetrack) { zoneini.unknown_error("checkpoint without racetrack"); + entity = 0; + checkpoint = 0; + } else { + checkpoint = new CheckPoint(racetrack); + entity = checkpoint; + checkpoint->set_radius(0); } - checkpoint->set_radius(0); } else if (zoneini.got_section("planet")) { planet = new Planet(); @@ -1533,7 +1538,6 @@ bool Game::generate_entity_menus(core::Entity *entity) using core::ButtonDescription; if ((entity->moduletype() != planet_enttype) && (entity->moduletype() != station_enttype)) { - //con_warn << "Can not generate menus for entity '" << entity->label() << "'" << std::endl; // not dockable return false; } diff --git a/src/game/base/jumppoint.cc b/src/game/base/jumppoint.cc index 08c7e67..6542b84 100644 --- a/src/game/base/jumppoint.cc +++ b/src/game/base/jumppoint.cc @@ -20,6 +20,7 @@ JumpPoint::JumpPoint() : core::EntityDynamic() // FIXME jumppoints should be harder to find set_flag(core::Entity::ShowOnMap); + set_flag(core::Entity::NonSolid); get_color().assign(0.0f, 0.8f, 0.8f, 1.0f); get_color_second().assign(0.6f, 1.0f); @@ -108,6 +109,7 @@ JumpGate::JumpGate() : JumpPoint() { entity_moduletypeid = jumpgate_enttype; unset_flag(core::Entity::Bright); + unset_flag(core::Entity::NonSolid); set_flag(core::Entity::ShowOnMap); set_radius(0.0f); set_state(core::Entity::NoPower); diff --git a/src/game/base/racetrack.cc b/src/game/base/racetrack.cc index 8d63552..5191711 100644 --- a/src/game/base/racetrack.cc +++ b/src/game/base/racetrack.cc @@ -28,8 +28,6 @@ CheckPoint::CheckPoint(RaceTrack *parent) } else { die(); } - - //set_flag(core::Entity::NonSolid); } CheckPoint::~CheckPoint() @@ -50,7 +48,6 @@ RaceTrack::RaceTrack() : EntityDynamic() set_state(core::Entity::NoPower); set_flag(core::Entity::Dockable); - //set_flag(core::Entity::NonSolid); } RaceTrack::~RaceTrack() diff --git a/src/game/base/shipmodel.cc b/src/game/base/shipmodel.cc index 85efcc1..ec3259d 100644 --- a/src/game/base/shipmodel.cc +++ b/src/game/base/shipmodel.cc @@ -92,9 +92,6 @@ bool ShipModel::init() } else if (inifile.got_key_bool("dock", b)) { shipmodel->set_dockable(b); continue; - } else if (inifile.got_key_bool("complex", b)) { - shipmodel->set_complex_collision(b); - continue; } else if (inifile.got_key_float("maxspeed", f)) { shipmodel->set_maxspeed(f * 0.01f); continue; @@ -215,7 +212,6 @@ ShipModel::ShipModel() : core::Info(shipmodel_infotype) shipmodel_jumpdrive = false; // no jumpdrive capability shipmodel_dockable = false; // not dockable shipmodel_template = 0; - shipmodel_complex_collision = false; } @@ -378,9 +374,6 @@ void ShipModel::apply(core::Entity *entity) const if (radius()) entity->set_radius(radius()); - - if (complex_collision()) - entity->set_flag(core::Entity::Complex); } void ShipModel::apply(Ship *ship) const diff --git a/src/game/base/shipmodel.h b/src/game/base/shipmodel.h index a576c1d..f790bcd 100644 --- a/src/game/base/shipmodel.h +++ b/src/game/base/shipmodel.h @@ -80,11 +80,6 @@ public: return shipmodel_angular_damping; } - /// complex collision - inline const bool complex_collision() const { - return shipmodel_complex_collision; - } - /// maximum thrust speed inline const float maxspeed() const { return shipmodel_maxspeed; @@ -196,13 +191,6 @@ protected: shipmodel_angular_damping = angular_damping; } - /** - * @brief enable collision mesh - */ - inline void set_complex_collision(const float complex_collision) { - shipmodel_complex_collision = complex_collision; - } - public: void generate_info(); @@ -244,8 +232,6 @@ private: bool shipmodel_jumpdrive; bool shipmodel_dockable; - bool shipmodel_complex_collision; - const Template *shipmodel_template; /* --- static ----------------------------------------------------- */ |