From c86b4142ff8adc8fc14f58d603b116dfd8ea6515 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 13 Nov 2010 21:44:04 +0000 Subject: added jumppoint and jumpgate templates, corrected a number of potentional radius related bugs --- src/game/base/jumppoint.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/game/base/jumppoint.h') 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 +#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; }; } -- cgit v1.2.3