ddnet/src/game/server/gs_game_tdm.cpp

31 lines
648 B
C++
Raw Normal View History

2007-11-25 19:42:40 +00:00
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
2007-12-15 10:24:49 +00:00
#include <engine/e_config.h>
#include "gs_common.hpp"
#include "gs_game_tdm.hpp"
GAMECONTROLLER_TDM::GAMECONTROLLER_TDM()
{
is_teamplay = true;
}
int GAMECONTROLLER_TDM::on_player_death(class PLAYER *victim, class PLAYER *killer, int weapon)
2007-11-26 19:18:49 +00:00
{
GAMECONTROLLER::on_player_death(victim, killer, weapon);
2007-11-26 19:18:49 +00:00
if(weapon >= 0)
{
// do team scoring
if(killer == victim)
teamscore[killer->team&1]--; // klant arschel
else
teamscore[killer->team&1]++; // good shit
}
return 0;
}
void GAMECONTROLLER_TDM::tick()
{
2008-01-17 23:09:49 +00:00
do_team_score_wincheck();
GAMECONTROLLER::tick();
}