From dfe499248f1b1236487156b28e4a535d7963fe35 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Wed, 27 Aug 2008 15:48:50 +0000 Subject: major commit. game client restructure. not complete, loads of stuff not working, but the structure is there --- src/game/server/gamecontroller.hpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/game/server/gamecontroller.hpp') diff --git a/src/game/server/gamecontroller.hpp b/src/game/server/gamecontroller.hpp index a3cfe9ba..d756768f 100644 --- a/src/game/server/gamecontroller.hpp +++ b/src/game/server/gamecontroller.hpp @@ -10,7 +10,28 @@ */ class GAMECONTROLLER { + vec2 spawn_points[3][64]; + int num_spawn_points[3]; protected: + struct SPAWNEVAL + { + SPAWNEVAL() + { + got = false; + friendly_team = -1; + pos = vec2(100,100); + } + + vec2 pos; + bool got; + int friendly_team; + float score; + }; + + float evaluate_spawn_pos(SPAWNEVAL *eval, vec2 pos); + void evaluate_spawn_type(SPAWNEVAL *eval, int type); + bool evaluate_spawn(class PLAYER *p, vec2 *pos); + void cyclemap(); void resetgame(); @@ -23,10 +44,11 @@ protected: int warmup; int round_count; - bool is_teamplay; public: int gametype; + bool is_teamplay; + GAMECONTROLLER(); void do_team_score_wincheck(); @@ -81,8 +103,12 @@ public: */ virtual int on_character_death(class CHARACTER *victim, class PLAYER *killer, int weapon); + virtual void on_player_info_change(class PLAYER *p); + // + virtual bool can_spawn(class PLAYER *p, vec2 *pos); + /* */ -- cgit 1.4.1