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/jumppoint.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/game/base/jumppoint.cc b/src/game/base/jumppoint.cc
index 5b4e689..270275f 100644
--- a/src/game/base/jumppoint.cc
+++ b/src/game/base/jumppoint.cc
@@ -82,6 +82,8 @@ JumpGate::JumpGate() : JumpPoint()
entity_moduletypeid = jumpgate_enttype;
entity_state = core::Entity::NoPower;
+
+ jumpgate_timer = 0;
}
JumpGate::~JumpGate()
@@ -143,12 +145,13 @@ void JumpGate::activate()
void JumpGate::frame(float elapsed)
{
- if (jumpgate_timer > 0)
+ if (jumpgate_timer > 0) {
jumpgate_timer -= elapsed;
- if (jumpgate_timer < 0) {
- set_state(core::Entity::NoPower);
- jumpgate_timer = 0;
+ if (jumpgate_timer < 0) {
+ set_state(core::Entity::NoPower);
+ jumpgate_timer = 0;
+ }
}
}