Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-08-20 12:51:15 +0000
committerStijn Buys <ingar@osirion.org>2009-08-20 12:51:15 +0000
commit3451b7a13b7a2567c960022111c0f9617fbc7340 (patch)
tree756240ac8ab5be0a3edd52a6245c1a0c822fcfc7 /src/game
parent8609fbe54481d812d69c4f0b4321312a7cb9c589 (diff)
initialize unitialized variables
Diffstat (limited to 'src/game')
-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;
+ }
}
}