about summary refs log tree commit diff
path: root/src/game/server/gamemodes/ctf.h
blob: b86ad68890ac1594b58762b2f033e078aec31f3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef GAME_SERVER_GAMEMODES_CTF_H
#define GAME_SERVER_GAMEMODES_CTF_H
#include <game/server/gamecontroller.h>
#include <game/server/entity.h>

class CGameControllerCTF : public IGameController
{
public:
	class CFlag *m_apFlags[2];
	
	CGameControllerCTF(class CGameContext *pGameServer);
	virtual bool CanBeMovedOnBalance(int Cid);
	virtual void Tick();
	
	virtual bool OnEntity(int Index, vec2 Pos);
	virtual int OnCharacterDeath(class CCharacter *pVictim, class CPlayer *pKiller, int Weapon);
};

// TODO: move to seperate file
class CFlag : public CEntity
{
public:
	static const int m_PhysSize = 14;
	CCharacter *m_pCarryingCCharacter;
	vec2 m_Vel;
	vec2 m_StandPos;
	
	int m_Team;
	int m_AtStand;
	int m_DropTick;
	int m_GrabTick;
	
	CFlag(CGameWorld *pGameWorld, int Team);

	virtual void Reset();
	virtual void Snap(int SnappingClient);
};
#endif