2016-06-04 15:24:23 +02:00
/***
*
* Copyright ( c ) 1996 - 2002 , Valve LLC . All rights reserved .
*
* This product contains software technology licensed from Id
* Software , Inc . ( " Id Technology " ) . Id Technology ( c ) 1996 Id Software , Inc .
* All Rights Reserved .
*
* Use , distribution , and modification of this source code and / or resulting
* object code is restricted to non - commercial enhancements to products from
* Valve LLC . All other use , distribution , or modification is prohibited
* without written permission from Valve LLC .
*
* * * */
//=========================================================
// GameRules
//=========================================================
2017-12-10 21:40:41 +01:00
# pragma once
2017-12-10 18:19:34 +01:00
# ifndef GAMERULES_H
# define GAMERULES_H
2016-06-04 15:24:23 +02:00
//#include "weapons.h"
//#include "items.h"
class CBasePlayerItem ;
class CBasePlayer ;
class CItem ;
class CBasePlayerAmmo ;
// weapon respawning return codes
enum
{
GR_NONE = 0 ,
2016-07-31 15:48:50 +02:00
2016-06-04 15:24:23 +02:00
GR_WEAPON_RESPAWN_YES ,
GR_WEAPON_RESPAWN_NO ,
2016-07-31 15:48:50 +02:00
2016-06-04 15:24:23 +02:00
GR_AMMO_RESPAWN_YES ,
GR_AMMO_RESPAWN_NO ,
2016-07-31 15:48:50 +02:00
2016-06-04 15:24:23 +02:00
GR_ITEM_RESPAWN_YES ,
GR_ITEM_RESPAWN_NO ,
GR_PLR_DROP_GUN_ALL ,
GR_PLR_DROP_GUN_ACTIVE ,
GR_PLR_DROP_GUN_NO ,
GR_PLR_DROP_AMMO_ALL ,
GR_PLR_DROP_AMMO_ACTIVE ,
2016-06-25 18:33:39 +02:00
GR_PLR_DROP_AMMO_NO
2016-06-04 15:24:23 +02:00
} ;
// Player relationship return codes
enum
{
GR_NOTTEAMMATE = 0 ,
GR_TEAMMATE ,
GR_ENEMY ,
GR_ALLY ,
2016-06-25 18:33:39 +02:00
GR_NEUTRAL
2016-06-04 15:24:23 +02:00
} ;
class CGameRules
{
public :
2016-08-02 23:40:57 +02:00
virtual ~ CGameRules ( ) { }
2016-08-02 19:24:25 +02:00
2016-06-04 15:24:23 +02:00
virtual void RefreshSkillData ( void ) ; // fill skill data struct with proper values
virtual void Think ( void ) = 0 ; // GR_Think - runs every server frame, should handle any timer tasks, periodic events, etc.
virtual BOOL IsAllowedToSpawn ( CBaseEntity * pEntity ) = 0 ; // Can this item spawn (eg monsters don't spawn in deathmatch).
virtual BOOL FAllowFlashlight ( void ) = 0 ; // Are players allowed to switch on their flashlight?
virtual BOOL FShouldSwitchWeapon ( CBasePlayer * pPlayer , CBasePlayerItem * pWeapon ) = 0 ; // should the player switch to this weapon?
virtual BOOL GetNextBestWeapon ( CBasePlayer * pPlayer , CBasePlayerItem * pCurrentWeapon ) = 0 ; // I can't use this weapon anymore, get me the next best one.
2016-06-25 18:33:39 +02:00
// Functions to verify the single/multiplayer status of a game
2016-06-04 15:24:23 +02:00
virtual BOOL IsMultiplayer ( void ) = 0 ; // is this a multiplayer game? (either coop or deathmatch)
virtual BOOL IsDeathmatch ( void ) = 0 ; //is this a deathmatch game?
virtual BOOL IsTeamplay ( void ) { return FALSE ; } ; // is this deathmatch game being played with team rules?
virtual BOOL IsCoOp ( void ) = 0 ; // is this a coop game?
virtual const char * GetGameDescription ( void ) { return " Half-Life " ; } // this is the game name that gets seen in the server browser
2016-06-25 18:33:39 +02:00
// Client connection/disconnection
2016-07-31 15:48:50 +02:00
virtual BOOL ClientConnected ( edict_t * pEntity , const char * pszName , const char * pszAddress , char szRejectReason [ 128 ] ) = 0 ; // a client just connected to the server (player hasn't spawned yet)
2016-06-04 15:24:23 +02:00
virtual void InitHUD ( CBasePlayer * pl ) = 0 ; // the client dll is ready for updating
virtual void ClientDisconnected ( edict_t * pClient ) = 0 ; // a client just disconnected from the server
virtual void UpdateGameMode ( CBasePlayer * pPlayer ) { } // the client needs to be informed of the current game mode
2016-06-25 18:33:39 +02:00
// Client damage rules
2016-06-04 15:24:23 +02:00
virtual float FlPlayerFallDamage ( CBasePlayer * pPlayer ) = 0 ; // this client just hit the ground after a fall. How much damage?
2016-07-31 15:48:50 +02:00
virtual BOOL FPlayerCanTakeDamage ( CBasePlayer * pPlayer , CBaseEntity * pAttacker ) { return TRUE ; } ; // can this player take damage from this attacker?
2016-06-04 15:24:23 +02:00
virtual BOOL ShouldAutoAim ( CBasePlayer * pPlayer , edict_t * target ) { return TRUE ; }
2016-06-25 18:33:39 +02:00
// Client spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual void PlayerSpawn ( CBasePlayer * pPlayer ) = 0 ; // called by CBasePlayer::Spawn just before releasing player into the game
virtual void PlayerThink ( CBasePlayer * pPlayer ) = 0 ; // called by CBasePlayer::PreThink every frame, before physics are run and after keys are accepted
virtual BOOL FPlayerCanRespawn ( CBasePlayer * pPlayer ) = 0 ; // is this player allowed to respawn now?
virtual float FlPlayerSpawnTime ( CBasePlayer * pPlayer ) = 0 ; // When in the future will this player be able to spawn?
virtual edict_t * GetPlayerSpawnSpot ( CBasePlayer * pPlayer ) ; // Place this player on their spawnspot and face them the proper direction.
virtual BOOL AllowAutoTargetCrosshair ( void ) { return TRUE ; } ;
virtual BOOL ClientCommand ( CBasePlayer * pPlayer , const char * pcmd ) { return FALSE ; } ; // handles the user commands; returns TRUE if command handled properly
2019-11-03 18:59:33 +01:00
virtual void ClientUserInfoChanged ( CBasePlayer * pPlayer , char * infobuffer ) ; // the player has changed userinfo; can change it now
2016-06-04 15:24:23 +02:00
2016-06-25 18:33:39 +02:00
// Client kills/scoring
2016-06-04 15:24:23 +02:00
virtual int IPointsForKill ( CBasePlayer * pAttacker , CBasePlayer * pKilled ) = 0 ; // how many points do I award whoever kills this player?
virtual void PlayerKilled ( CBasePlayer * pVictim , entvars_t * pKiller , entvars_t * pInflictor ) = 0 ; // Called each time a player dies
virtual void DeathNotice ( CBasePlayer * pVictim , entvars_t * pKiller , entvars_t * pInflictor ) = 0 ; // Call this from within a GameRules class to report an obituary.
2016-06-25 18:33:39 +02:00
// Weapon retrieval
2016-06-04 15:24:23 +02:00
virtual BOOL CanHavePlayerItem ( CBasePlayer * pPlayer , CBasePlayerItem * pWeapon ) ; // The player is touching an CBasePlayerItem, do I give it to him?
virtual void PlayerGotWeapon ( CBasePlayer * pPlayer , CBasePlayerItem * pWeapon ) = 0 ; // Called each time a player picks up a weapon from the ground
2016-06-25 18:33:39 +02:00
// Weapon spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual int WeaponShouldRespawn ( CBasePlayerItem * pWeapon ) = 0 ; // should this weapon respawn?
virtual float FlWeaponRespawnTime ( CBasePlayerItem * pWeapon ) = 0 ; // when may this weapon respawn?
virtual float FlWeaponTryRespawn ( CBasePlayerItem * pWeapon ) = 0 ; // can i respawn now, and if not, when should i try again?
virtual Vector VecWeaponRespawnSpot ( CBasePlayerItem * pWeapon ) = 0 ; // where in the world should this weapon respawn?
2016-06-25 18:33:39 +02:00
// Item retrieval
2016-06-04 15:24:23 +02:00
virtual BOOL CanHaveItem ( CBasePlayer * pPlayer , CItem * pItem ) = 0 ; // is this player allowed to take this item?
virtual void PlayerGotItem ( CBasePlayer * pPlayer , CItem * pItem ) = 0 ; // call each time a player picks up an item (battery, healthkit, longjump)
2016-06-25 18:33:39 +02:00
// Item spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual int ItemShouldRespawn ( CItem * pItem ) = 0 ; // Should this item respawn?
virtual float FlItemRespawnTime ( CItem * pItem ) = 0 ; // when may this item respawn?
virtual Vector VecItemRespawnSpot ( CItem * pItem ) = 0 ; // where in the world should this item respawn?
2016-06-25 18:33:39 +02:00
// Ammo retrieval
2016-06-04 15:24:23 +02:00
virtual BOOL CanHaveAmmo ( CBasePlayer * pPlayer , const char * pszAmmoName , int iMaxCarry ) ; // can this player take more of this ammo?
virtual void PlayerGotAmmo ( CBasePlayer * pPlayer , char * szName , int iCount ) = 0 ; // called each time a player picks up some ammo in the world
2016-06-25 18:33:39 +02:00
// Ammo spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual int AmmoShouldRespawn ( CBasePlayerAmmo * pAmmo ) = 0 ; // should this ammo item respawn?
virtual float FlAmmoRespawnTime ( CBasePlayerAmmo * pAmmo ) = 0 ; // when should this ammo item respawn?
virtual Vector VecAmmoRespawnSpot ( CBasePlayerAmmo * pAmmo ) = 0 ; // where in the world should this ammo item respawn?
2016-06-25 18:33:39 +02:00
// by default, everything spawns
2016-06-04 15:24:23 +02:00
2016-06-25 18:33:39 +02:00
// Healthcharger respawn control
2016-06-04 15:24:23 +02:00
virtual float FlHealthChargerRechargeTime ( void ) = 0 ; // how long until a depleted HealthCharger recharges itself?
virtual float FlHEVChargerRechargeTime ( void ) { return 0 ; } // how long until a depleted HealthCharger recharges itself?
2016-06-25 18:33:39 +02:00
// What happens to a dead player's weapons
2016-06-04 15:24:23 +02:00
virtual int DeadPlayerWeapons ( CBasePlayer * pPlayer ) = 0 ; // what do I do with a player's weapons when he's killed?
2016-06-25 18:33:39 +02:00
// What happens to a dead player's ammo
2016-06-04 15:24:23 +02:00
virtual int DeadPlayerAmmo ( CBasePlayer * pPlayer ) = 0 ; // Do I drop ammo when the player dies? How much?
2016-06-25 18:33:39 +02:00
// Teamplay stuff
2016-06-04 15:24:23 +02:00
virtual const char * GetTeamID ( CBaseEntity * pEntity ) = 0 ; // what team is this entity on?
virtual int PlayerRelationship ( CBaseEntity * pPlayer , CBaseEntity * pTarget ) = 0 ; // What is the player's relationship with this entity?
virtual int GetTeamIndex ( const char * pTeamName ) { return - 1 ; }
virtual const char * GetIndexedTeamName ( int teamIndex ) { return " " ; }
virtual BOOL IsValidTeam ( const char * pTeamName ) { return TRUE ; }
virtual void ChangePlayerTeam ( CBasePlayer * pPlayer , const char * pTeamName , BOOL bKill , BOOL bGib ) { }
virtual const char * SetDefaultPlayerTeam ( CBasePlayer * pPlayer ) { return " " ; }
2016-06-25 18:33:39 +02:00
// Sounds
2016-06-04 15:24:23 +02:00
virtual BOOL PlayTextureSounds ( void ) { return TRUE ; }
virtual BOOL PlayFootstepSounds ( CBasePlayer * pl , float fvol ) { return TRUE ; }
2016-06-25 18:33:39 +02:00
// Monsters
2016-06-04 15:24:23 +02:00
virtual BOOL FAllowMonsters ( void ) = 0 ; //are monsters allowed
// Immediately end a multiplayer game
virtual void EndMultiplayerGame ( void ) { }
} ;
extern CGameRules * InstallGameRules ( void ) ;
//=========================================================
// CHalfLifeRules - rules for the single player Half-Life
// game.
//=========================================================
class CHalfLifeRules : public CGameRules
{
public :
CHalfLifeRules ( void ) ;
2016-06-25 18:33:39 +02:00
// GR_Think
2016-06-04 15:24:23 +02:00
virtual void Think ( void ) ;
virtual BOOL IsAllowedToSpawn ( CBaseEntity * pEntity ) ;
virtual BOOL FAllowFlashlight ( void ) { return TRUE ; } ;
virtual BOOL FShouldSwitchWeapon ( CBasePlayer * pPlayer , CBasePlayerItem * pWeapon ) ;
virtual BOOL GetNextBestWeapon ( CBasePlayer * pPlayer , CBasePlayerItem * pCurrentWeapon ) ;
2016-07-31 15:48:50 +02:00
2016-06-25 18:33:39 +02:00
// Functions to verify the single/multiplayer status of a game
2016-06-04 15:24:23 +02:00
virtual BOOL IsMultiplayer ( void ) ;
virtual BOOL IsDeathmatch ( void ) ;
virtual BOOL IsCoOp ( void ) ;
2016-06-25 18:33:39 +02:00
// Client connection/disconnection
2016-06-04 15:24:23 +02:00
virtual BOOL ClientConnected ( edict_t * pEntity , const char * pszName , const char * pszAddress , char szRejectReason [ 128 ] ) ;
virtual void InitHUD ( CBasePlayer * pl ) ; // the client dll is ready for updating
virtual void ClientDisconnected ( edict_t * pClient ) ;
2016-06-25 18:33:39 +02:00
// Client damage rules
2016-06-04 15:24:23 +02:00
virtual float FlPlayerFallDamage ( CBasePlayer * pPlayer ) ;
2016-07-31 15:48:50 +02:00
2016-06-25 18:33:39 +02:00
// Client spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual void PlayerSpawn ( CBasePlayer * pPlayer ) ;
virtual void PlayerThink ( CBasePlayer * pPlayer ) ;
virtual BOOL FPlayerCanRespawn ( CBasePlayer * pPlayer ) ;
virtual float FlPlayerSpawnTime ( CBasePlayer * pPlayer ) ;
virtual BOOL AllowAutoTargetCrosshair ( void ) ;
2016-06-25 18:33:39 +02:00
// Client kills/scoring
2016-06-04 15:24:23 +02:00
virtual int IPointsForKill ( CBasePlayer * pAttacker , CBasePlayer * pKilled ) ;
virtual void PlayerKilled ( CBasePlayer * pVictim , entvars_t * pKiller , entvars_t * pInflictor ) ;
virtual void DeathNotice ( CBasePlayer * pVictim , entvars_t * pKiller , entvars_t * pInflictor ) ;
2016-06-25 18:33:39 +02:00
// Weapon retrieval
2016-06-04 15:24:23 +02:00
virtual void PlayerGotWeapon ( CBasePlayer * pPlayer , CBasePlayerItem * pWeapon ) ;
2016-06-25 18:33:39 +02:00
// Weapon spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual int WeaponShouldRespawn ( CBasePlayerItem * pWeapon ) ;
virtual float FlWeaponRespawnTime ( CBasePlayerItem * pWeapon ) ;
virtual float FlWeaponTryRespawn ( CBasePlayerItem * pWeapon ) ;
virtual Vector VecWeaponRespawnSpot ( CBasePlayerItem * pWeapon ) ;
2016-06-25 18:33:39 +02:00
// Item retrieval
2016-06-04 15:24:23 +02:00
virtual BOOL CanHaveItem ( CBasePlayer * pPlayer , CItem * pItem ) ;
virtual void PlayerGotItem ( CBasePlayer * pPlayer , CItem * pItem ) ;
2016-06-25 18:33:39 +02:00
// Item spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual int ItemShouldRespawn ( CItem * pItem ) ;
virtual float FlItemRespawnTime ( CItem * pItem ) ;
virtual Vector VecItemRespawnSpot ( CItem * pItem ) ;
2016-06-25 18:33:39 +02:00
// Ammo retrieval
2016-06-04 15:24:23 +02:00
virtual void PlayerGotAmmo ( CBasePlayer * pPlayer , char * szName , int iCount ) ;
2016-06-25 18:33:39 +02:00
// Ammo spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual int AmmoShouldRespawn ( CBasePlayerAmmo * pAmmo ) ;
virtual float FlAmmoRespawnTime ( CBasePlayerAmmo * pAmmo ) ;
virtual Vector VecAmmoRespawnSpot ( CBasePlayerAmmo * pAmmo ) ;
2016-06-25 18:33:39 +02:00
// Healthcharger respawn control
2016-06-04 15:24:23 +02:00
virtual float FlHealthChargerRechargeTime ( void ) ;
2016-06-25 18:33:39 +02:00
// What happens to a dead player's weapons
2016-06-04 15:24:23 +02:00
virtual int DeadPlayerWeapons ( CBasePlayer * pPlayer ) ;
2016-06-25 18:33:39 +02:00
// What happens to a dead player's ammo
2016-06-04 15:24:23 +02:00
virtual int DeadPlayerAmmo ( CBasePlayer * pPlayer ) ;
2016-06-25 18:33:39 +02:00
// Monsters
2016-06-04 15:24:23 +02:00
virtual BOOL FAllowMonsters ( void ) ;
2016-06-25 18:33:39 +02:00
// Teamplay stuff
2016-06-04 15:24:23 +02:00
virtual const char * GetTeamID ( CBaseEntity * pEntity ) { return " " ; } ;
virtual int PlayerRelationship ( CBaseEntity * pPlayer , CBaseEntity * pTarget ) ;
} ;
//=========================================================
// CHalfLifeMultiplay - rules for the basic half life multiplayer
// competition
//=========================================================
class CHalfLifeMultiplay : public CGameRules
{
public :
CHalfLifeMultiplay ( ) ;
2016-06-25 18:33:39 +02:00
// GR_Think
2016-06-04 15:24:23 +02:00
virtual void Think ( void ) ;
virtual void RefreshSkillData ( void ) ;
virtual BOOL IsAllowedToSpawn ( CBaseEntity * pEntity ) ;
virtual BOOL FAllowFlashlight ( void ) ;
virtual BOOL FShouldSwitchWeapon ( CBasePlayer * pPlayer , CBasePlayerItem * pWeapon ) ;
virtual BOOL GetNextBestWeapon ( CBasePlayer * pPlayer , CBasePlayerItem * pCurrentWeapon ) ;
2016-06-25 18:33:39 +02:00
// Functions to verify the single/multiplayer status of a game
2016-06-04 15:24:23 +02:00
virtual BOOL IsMultiplayer ( void ) ;
virtual BOOL IsDeathmatch ( void ) ;
virtual BOOL IsCoOp ( void ) ;
2016-06-25 18:33:39 +02:00
// Client connection/disconnection
2016-06-04 15:24:23 +02:00
// If ClientConnected returns FALSE, the connection is rejected and the user is provided the reason specified in
// svRejectReason
// Only the client's name and remote address are provided to the dll for verification.
2016-07-31 15:48:50 +02:00
virtual BOOL ClientConnected ( edict_t * pEntity , const char * pszName , const char * pszAddress , char szRejectReason [ 128 ] ) ;
2016-06-04 15:24:23 +02:00
virtual void InitHUD ( CBasePlayer * pl ) ; // the client dll is ready for updating
virtual void ClientDisconnected ( edict_t * pClient ) ;
virtual void UpdateGameMode ( CBasePlayer * pPlayer ) ; // the client needs to be informed of the current game mode
2016-06-25 18:33:39 +02:00
// Client damage rules
2016-06-04 15:24:23 +02:00
virtual float FlPlayerFallDamage ( CBasePlayer * pPlayer ) ;
virtual BOOL FPlayerCanTakeDamage ( CBasePlayer * pPlayer , CBaseEntity * pAttacker ) ;
2016-06-25 18:33:39 +02:00
// Client spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual void PlayerSpawn ( CBasePlayer * pPlayer ) ;
virtual void PlayerThink ( CBasePlayer * pPlayer ) ;
virtual BOOL FPlayerCanRespawn ( CBasePlayer * pPlayer ) ;
virtual float FlPlayerSpawnTime ( CBasePlayer * pPlayer ) ;
virtual edict_t * GetPlayerSpawnSpot ( CBasePlayer * pPlayer ) ;
virtual BOOL AllowAutoTargetCrosshair ( void ) ;
virtual BOOL ClientCommand ( CBasePlayer * pPlayer , const char * pcmd ) ;
2016-06-25 18:33:39 +02:00
// Client kills/scoring
2016-06-04 15:24:23 +02:00
virtual int IPointsForKill ( CBasePlayer * pAttacker , CBasePlayer * pKilled ) ;
virtual void PlayerKilled ( CBasePlayer * pVictim , entvars_t * pKiller , entvars_t * pInflictor ) ;
virtual void DeathNotice ( CBasePlayer * pVictim , entvars_t * pKiller , entvars_t * pInflictor ) ;
2016-06-25 18:33:39 +02:00
// Weapon retrieval
2016-06-04 15:24:23 +02:00
virtual void PlayerGotWeapon ( CBasePlayer * pPlayer , CBasePlayerItem * pWeapon ) ;
virtual BOOL CanHavePlayerItem ( CBasePlayer * pPlayer , CBasePlayerItem * pWeapon ) ; // The player is touching an CBasePlayerItem, do I give it to him?
2016-06-25 18:33:39 +02:00
// Weapon spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual int WeaponShouldRespawn ( CBasePlayerItem * pWeapon ) ;
virtual float FlWeaponRespawnTime ( CBasePlayerItem * pWeapon ) ;
virtual float FlWeaponTryRespawn ( CBasePlayerItem * pWeapon ) ;
virtual Vector VecWeaponRespawnSpot ( CBasePlayerItem * pWeapon ) ;
2016-06-25 18:33:39 +02:00
// Item retrieval
2016-06-04 15:24:23 +02:00
virtual BOOL CanHaveItem ( CBasePlayer * pPlayer , CItem * pItem ) ;
virtual void PlayerGotItem ( CBasePlayer * pPlayer , CItem * pItem ) ;
2016-06-25 18:33:39 +02:00
// Item spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual int ItemShouldRespawn ( CItem * pItem ) ;
virtual float FlItemRespawnTime ( CItem * pItem ) ;
virtual Vector VecItemRespawnSpot ( CItem * pItem ) ;
2016-06-25 18:33:39 +02:00
// Ammo retrieval
2016-06-04 15:24:23 +02:00
virtual void PlayerGotAmmo ( CBasePlayer * pPlayer , char * szName , int iCount ) ;
2016-06-25 18:33:39 +02:00
// Ammo spawn/respawn control
2016-06-04 15:24:23 +02:00
virtual int AmmoShouldRespawn ( CBasePlayerAmmo * pAmmo ) ;
virtual float FlAmmoRespawnTime ( CBasePlayerAmmo * pAmmo ) ;
virtual Vector VecAmmoRespawnSpot ( CBasePlayerAmmo * pAmmo ) ;
2016-06-25 18:33:39 +02:00
// Healthcharger respawn control
2016-06-04 15:24:23 +02:00
virtual float FlHealthChargerRechargeTime ( void ) ;
virtual float FlHEVChargerRechargeTime ( void ) ;
2016-06-25 18:33:39 +02:00
// What happens to a dead player's weapons
2016-06-04 15:24:23 +02:00
virtual int DeadPlayerWeapons ( CBasePlayer * pPlayer ) ;
2016-06-25 18:33:39 +02:00
// What happens to a dead player's ammo
2016-06-04 15:24:23 +02:00
virtual int DeadPlayerAmmo ( CBasePlayer * pPlayer ) ;
2016-06-25 18:33:39 +02:00
// Teamplay stuff
2016-06-04 15:24:23 +02:00
virtual const char * GetTeamID ( CBaseEntity * pEntity ) { return " " ; }
virtual int PlayerRelationship ( CBaseEntity * pPlayer , CBaseEntity * pTarget ) ;
virtual BOOL PlayTextureSounds ( void ) { return FALSE ; }
virtual BOOL PlayFootstepSounds ( CBasePlayer * pl , float fvol ) ;
2016-06-25 18:33:39 +02:00
// Monsters
2016-06-04 15:24:23 +02:00
virtual BOOL FAllowMonsters ( void ) ;
// Immediately end a multiplayer game
virtual void EndMultiplayerGame ( void ) { GoToIntermission ( ) ; }
protected :
virtual void ChangeLevel ( void ) ;
virtual void GoToIntermission ( void ) ;
float m_flIntermissionEndTime ;
BOOL m_iEndIntermissionButtonHit ;
void SendMOTDToClient ( edict_t * client ) ;
} ;
2016-07-31 15:48:50 +02:00
extern DLL_GLOBAL CGameRules * g_pGameRules ;
2017-12-10 18:19:34 +01:00
# endif // GAMERULES_H