mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
31 lines
620 B
C++
31 lines
620 B
C++
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
|
|
#include <engine/e_config.h>
|
|
#include "gs_common.h"
|
|
#include "gs_game_tdm.h"
|
|
|
|
gameobject_tdm::gameobject_tdm()
|
|
{
|
|
is_teamplay = true;
|
|
}
|
|
|
|
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()
|
|
{
|
|
do_team_score_wincheck();
|
|
gameobject::tick();
|
|
}
|