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.h | |
parent | b68389e450d537eed51683515d1c4d6f7450caf2 (diff) |
added jumppoint and jumpgate templates, corrected a number of potentional
radius related bugs
Diffstat (limited to 'src/game/base/jumppoint.h')
-rw-r--r-- | src/game/base/jumppoint.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/game/base/jumppoint.h b/src/game/base/jumppoint.h index cb3ee28..40f9e5d 100644 --- a/src/game/base/jumppoint.h +++ b/src/game/base/jumppoint.h @@ -7,11 +7,12 @@ #ifndef __INCLUDED_BASE_JUMPPOINT_H__ #define __INCLUDED_BASE_JUMPPOINT_H__ -#include "core/entity.h" -#include "math/mathlib.h" - #include <string> +#include "math/mathlib.h" +#include "core/entity.h" +#include "base/template.h" + namespace game { @@ -43,10 +44,16 @@ public: /// validate the targetlabel and set target() virtual void validate(); + + static inline void set_template (const Template *entitytemplate) { + jumppoint_template = entitytemplate; + } private: std::string jumppoint_targetlabel; JumpPoint *jumppoint_target; + + static const Template *jumppoint_template; }; /// a jumpgate @@ -69,8 +76,15 @@ public: void activate(); virtual void frame(float elapsed); + + static inline void set_template (const Template *entitytemplate) { + jumpgate_template = entitytemplate; + } + private: float jumpgate_timer; + + static const Template *jumpgate_template; }; } |