/*
 * Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include "../gamerules.h"

class CSGameRules:CGameRules
{
	virtual void(entity) PlayerConnect;
	virtual void(entity) PlayerDisconnect;
	virtual void(base_player) PlayerKill;
	virtual void(base_player) PlayerPostFrame;
	virtual void(base_player) PlayerDeath;
	virtual void(base_player) PlayerPain;

	/* level transitions */
	virtual void(base_player) LevelChangeParms;
	virtual void(base_player) LevelDecodeParms;
	virtual void(void) LevelNewParms;

	virtual int(base_player) BuyingPossible;
}; 

class CSSingleplayerRules:CSGameRules
{
	/* client */
	virtual void(base_player) PlayerSpawn;
	virtual void(base_player) PlayerDeath;
};

class CSMultiplayerRules:CSGameRules
{
	entity m_eLastTSpawn;
	entity m_eLastCTSpawn;

	void() CSMultiplayerRules;

	virtual void(void) InitPostEnts;
	virtual void(void) FrameStart;
	virtual void(base_player) PlayerSpawn;
	virtual void(base_player) PlayerPreFrame;
	virtual void(base_player) PlayerDeath;
	virtual int(int) MaxItemPerSlot;
	virtual float(base_player, string) ConsoleCommand;

	/* CS specific */
	virtual void(void) CreateRescueZones;
	virtual void(void) CreateCTBuyzones;
	virtual void(void) CreateTBuyzones;
	virtual void(float, int) TimerBegin;
	virtual void(void) TimerUpdate;

	virtual int(base_player) BuyingPossible;
	virtual void(int, int, int) RoundOver;
	virtual void(int) RestartRound;
	virtual void(base_player) DeathCheck;
	virtual void(base_player) MakeBomber;
	virtual void(base_player) MakeVIP;
	virtual void(void) CountPlayers;
	virtual void(void) SwitchTeams;
	virtual void(void) TimeOut;

	virtual void(base_player) PlayerClearWeaponry;
	virtual void(base_player, int) PlayerMakePlayable;
	virtual void(base_player) PlayerMakeSpectator;
	virtual void(base_player, int) PlayerRespawn;
	virtual entity(float) PlayerFindSpawn;
};

void CSEv_JoinAuto(void);
