mirror of
https://github.com/ENSL/NS.git
synced 2024-11-26 22:40:58 +00:00
8552ac617c
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@1 67975925-1194-0748-b3d5-c16f83f1a3a1
58 lines
No EOL
2.4 KiB
C++
58 lines
No EOL
2.4 KiB
C++
/***
|
|
*
|
|
* Copyright (c) 1999, 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.
|
|
*
|
|
****/
|
|
//
|
|
// teamplay_gamerules.h
|
|
//
|
|
#ifndef CHALFLIFETEAMPLAY_H
|
|
#define CHALFLIFETEAMPLAY_H
|
|
|
|
#include "game_shared/teamconst.h"
|
|
|
|
class CHalfLifeTeamplay : public CHalfLifeMultiplay
|
|
{
|
|
public:
|
|
CHalfLifeTeamplay();
|
|
|
|
virtual BOOL ClientCommand( CBasePlayer *pPlayer, const char *pcmd );
|
|
virtual void ClientUserInfoChanged( CBasePlayer *pPlayer, char *infobuffer );
|
|
virtual BOOL IsTeamplay( void );
|
|
virtual BOOL FPlayerCanTakeDamage( CBasePlayer *pPlayer, CBaseEntity *pAttacker );
|
|
virtual int PlayerRelationship( CBaseEntity *pPlayer, CBaseEntity *pTarget );
|
|
virtual const char *GetTeamID( CBaseEntity *pEntity );
|
|
virtual BOOL ShouldAutoAim( CBasePlayer *pPlayer, edict_t *target );
|
|
virtual int IPointsForKill( CBasePlayer *pAttacker, CBasePlayer *pKilled );
|
|
virtual void InitHUD( CBasePlayer *pl );
|
|
virtual void DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pevInflictor );
|
|
virtual const char *GetGameDescription( void ) { return "HL Teamplay"; } // this is the game name that gets seen in the server browser
|
|
virtual void UpdateGameMode( CBasePlayer *pPlayer ); // the client needs to be informed of the current game mode
|
|
virtual void PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor );
|
|
virtual void Think ( void );
|
|
virtual int GetTeamIndex( const char *pTeamName );
|
|
virtual const char *GetIndexedTeamName( int teamIndex );
|
|
virtual BOOL IsValidTeam( const char *pTeamName );
|
|
const char *SetDefaultPlayerTeam( CBasePlayer *pPlayer );
|
|
virtual void ChangePlayerTeam( CBasePlayer *pPlayer, const char *pTeamName, BOOL bKill, BOOL bGib );
|
|
|
|
private:
|
|
void RecountTeams( void );
|
|
const char *TeamWithFewestPlayers( void );
|
|
|
|
BOOL m_DisableDeathMessages;
|
|
BOOL m_DisableDeathPenalty;
|
|
BOOL m_teamLimit; // This means the server set only some teams as valid
|
|
char m_szTeamList[TEAMPLAY_TEAMLISTLENGTH];
|
|
};
|
|
|
|
#endif |