added mod gamemode

This commit is contained in:
Alfred Eriksson 2009-01-11 09:29:15 +00:00
parent 0f41c47996
commit 9a65b577ad
3 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,17 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "mod.hpp"
GAMECONTROLLER_MOD::GAMECONTROLLER_MOD()
{
gametype = "MOD";
//game_flags = GAMEFLAG_TEAMS; // GAMEFLAG_TEAMS makes it a two-team gamemode
}
void GAMECONTROLLER_MOD::tick()
{
// this is the main part of the gamemode, this function is run every tick
do_player_score_wincheck(); // checks for winners, no teams version
//do_team_score_wincheck(); // checks for winners, two teams version
GAMECONTROLLER::tick();
}

View file

@ -0,0 +1,11 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <game/server/gamecontroller.hpp>
class GAMECONTROLLER_MOD : public GAMECONTROLLER
{
public:
GAMECONTROLLER_MOD();
virtual void tick();
// add more virtual functions here if you wish
};

View file

@ -21,6 +21,7 @@ extern "C"
#include "gamemodes/dm.hpp"
#include "gamemodes/tdm.hpp"
#include "gamemodes/ctf.hpp"
#include "gamemodes/mod.hpp"
TUNING_PARAMS tuning;