some changes in bot's code
This commit is contained in:
@ -38,7 +38,7 @@
|
||||
// *****************************************************
|
||||
|
||||
void CPlayer::Disconnect(){
|
||||
ingame = staminaSet = fuseSet = false;
|
||||
ingame = staminaSet = fuseSet = bot = false;
|
||||
}
|
||||
|
||||
void CPlayer::PutInServer(){
|
||||
@ -55,7 +55,7 @@ void CPlayer::Init( int pi, edict_t* pe )
|
||||
pEdict = pe;
|
||||
index = pi;
|
||||
current = 0;
|
||||
ingame = staminaSet = false;
|
||||
ingame = staminaSet = fuseSet = bot = false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -90,6 +90,7 @@ void Grenades::clear()
|
||||
|
||||
void CPlayer::Disconnect(){
|
||||
ingame = false;
|
||||
bot = false;
|
||||
savedScore = 0;
|
||||
|
||||
if ( ignoreBots(pEdict) || !isModuleActive() ) // ignore if he is bot and bots rank is disabled or module is paused
|
||||
@ -150,6 +151,7 @@ void CPlayer::Init( int pi, edict_t* pe )
|
||||
current = 0;
|
||||
clearStats = 0.0f;
|
||||
ingame = false;
|
||||
bot = false;
|
||||
savedScore = 0;
|
||||
}
|
||||
|
||||
|
@ -195,13 +195,13 @@ void ServerDeactivate() {
|
||||
|
||||
BOOL ClientConnect_Post( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] ){
|
||||
GET_PLAYER_POINTER(pEntity)->Connect(pszName,pszAddress);
|
||||
|
||||
|
||||
RETURN_META_VALUE(MRES_IGNORED, TRUE);
|
||||
}
|
||||
|
||||
void ClientDisconnect( edict_t *pEntity ) {
|
||||
CPlayer *pPlayer = GET_PLAYER_POINTER(pEntity);
|
||||
|
||||
|
||||
if (pPlayer->ingame)
|
||||
pPlayer->Disconnect();
|
||||
|
||||
|
Reference in New Issue
Block a user