diff options
author | Stijn Buys <ingar@osirion.org> | 2010-11-13 21:44:04 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-11-13 21:44:04 +0000 |
commit | c86b4142ff8adc8fc14f58d603b116dfd8ea6515 (patch) | |
tree | 21076e7db33a4532949337f153e9c38c85c2c62a /src/game/base/jumppoint.cc | |
parent | b68389e450d537eed51683515d1c4d6f7450caf2 (diff) |
added jumppoint and jumpgate templates, corrected a number of potentional
radius related bugs
Diffstat (limited to 'src/game/base/jumppoint.cc')
-rw-r--r-- | src/game/base/jumppoint.cc | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/game/base/jumppoint.cc b/src/game/base/jumppoint.cc index e52873e..1f2c0a9 100644 --- a/src/game/base/jumppoint.cc +++ b/src/game/base/jumppoint.cc @@ -12,16 +12,24 @@ namespace game /* ---- class JumpPoint -------------------------------------------- */ +const Template *JumpPoint::jumppoint_template = 0; + JumpPoint::JumpPoint() : core::EntityDynamic() { set_shape(core::Entity::Diamond); + + // FIXME jumppoints should be harder to find + set_flag(core::Entity::ShowOnMap); + 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::Bright); - // FIXME jumppoints should be harder to find - set_flag(core::Entity::ShowOnMap); - + + if (jumppoint_template) + jumppoint_template->apply(this); + entity_moduletypeid = jumppoint_enttype; jumppoint_target = 0; set_serverside(false); @@ -94,15 +102,19 @@ void JumpPoint::validate() /* ---- class JumpGate --------------------------------------------- */ +const Template *JumpGate::jumpgate_template = 0; + JumpGate::JumpGate() : JumpPoint() { + entity_moduletypeid = jumpgate_enttype; unset_flag(core::Entity::Bright); set_flag(core::Entity::ShowOnMap); - set_radius(1.0f); - - entity_moduletypeid = jumpgate_enttype; - entity_state = core::Entity::NoPower; - + set_radius(0.0f); + set_state(core::Entity::NoPower); + + if (jumpgate_template) + jumpgate_template->apply(this); + jumpgate_timer = 0; } |