diff --git a/src/game/server/gamemodes/mod.cpp b/src/game/server/gamemodes/mod.cpp new file mode 100644 index 000000000..00199305d --- /dev/null +++ b/src/game/server/gamemodes/mod.cpp @@ -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(); +} diff --git a/src/game/server/gamemodes/mod.hpp b/src/game/server/gamemodes/mod.hpp new file mode 100644 index 000000000..35d6d9891 --- /dev/null +++ b/src/game/server/gamemodes/mod.hpp @@ -0,0 +1,11 @@ +/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ + +#include + +class GAMECONTROLLER_MOD : public GAMECONTROLLER +{ +public: + GAMECONTROLLER_MOD(); + virtual void tick(); + // add more virtual functions here if you wish +}; diff --git a/src/game/server/hooks.cpp b/src/game/server/hooks.cpp index e9a8daaa9..64cf34071 100644 --- a/src/game/server/hooks.cpp +++ b/src/game/server/hooks.cpp @@ -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;