ddnet/src/game/server/gs_game_tdm.cpp

31 lines
620 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.h"
#include "gs_game_tdm.h"
gameobject_tdm::gameobject_tdm()
{
is_teamplay = true;
}
2007-11-26 19:18:49 +00:00
int gameobject_tdm::on_player_death(class player *victim, class player *killer, int weapon)
{
gameobject::on_player_death(victim, killer, weapon);
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 gameobject_tdm::tick()
{
2008-01-17 23:09:49 +00:00
do_team_score_wincheck();
2007-10-04 23:58:22 +00:00
gameobject::tick();
}