2020-04-14 16:18:19 -07:00
|
|
|
/*
|
|
|
|
* 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(player) PlayerKill;
|
|
|
|
virtual void(player) PlayerPostFrame;
|
2020-04-20 10:25:15 -07:00
|
|
|
virtual void(player) PlayerDeath;
|
|
|
|
virtual void(player) PlayerPain;
|
2020-04-14 16:18:19 -07:00
|
|
|
|
|
|
|
/* level transitions */
|
|
|
|
virtual void(player) LevelChangeParms;
|
|
|
|
virtual void(player) LevelDecodeParms;
|
|
|
|
virtual void(void) LevelNewParms;
|
|
|
|
|
|
|
|
virtual int(player) BuyingPossible;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CSSingleplayerRules:CSGameRules
|
|
|
|
{
|
|
|
|
/* client */
|
|
|
|
virtual void(player) PlayerSpawn;
|
2020-04-20 10:25:15 -07:00
|
|
|
virtual void(player) PlayerDeath;
|
2020-04-14 16:18:19 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
class CSMultiplayerRules:CSGameRules
|
|
|
|
{
|
|
|
|
entity m_eLastTSpawn;
|
|
|
|
entity m_eLastCTSpawn;
|
|
|
|
|
|
|
|
void() CSMultiplayerRules;
|
|
|
|
|
|
|
|
virtual void(void) InitPostEnts;
|
|
|
|
virtual void(void) FrameStart;
|
|
|
|
virtual void(player) PlayerSpawn;
|
|
|
|
virtual void(player) PlayerPreFrame;
|
2020-04-20 10:25:15 -07:00
|
|
|
virtual void(player) PlayerDeath;
|
2020-04-23 13:42:09 -07:00
|
|
|
virtual int(void) MaxItemPerSlot;
|
2020-04-14 16:18:19 -07:00
|
|
|
|
|
|
|
/* 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(player) BuyingPossible;
|
|
|
|
virtual void(int, int, int) RoundOver;
|
|
|
|
virtual void(int) RestartRound;
|
|
|
|
virtual void(player) DeathCheck;
|
|
|
|
virtual void(player) MakeBomber;
|
|
|
|
virtual void(player) MakeVIP;
|
|
|
|
virtual void(void) CountPlayers;
|
|
|
|
virtual void(void) SwitchTeams;
|
|
|
|
virtual void(void) TimeOut;
|
|
|
|
|
|
|
|
virtual void(player, int) PlayerMakePlayable;
|
|
|
|
virtual void(player) PlayerMakeSpectator;
|
|
|
|
virtual void(player, int) PlayerRespawn;
|
|
|
|
virtual entity(float) PlayerFindSpawn;
|
|
|
|
};
|