some changes in bot's code

This commit is contained in:
Lukasz Wlasinksi
2004-08-12 13:22:34 +00:00
parent 3155a300c6
commit 796a7ad4d7
9 changed files with 11 additions and 10 deletions

View File

@ -75,7 +75,6 @@ void CPlayer::PutInServer(){
ingame = false;
}
void CPlayer::Connect( const char* ippp ){
bot = IsBot();
strcpy(ip,ippp);
}

View File

@ -90,7 +90,6 @@ struct CPlayer {
int frags; // suma dla kontroli ostatniego fraga, to - v.frags = lastfrag
bool ingame;
bool bot;
float clearStats;
struct PlayerWeapon : public Stats {
@ -117,6 +116,7 @@ struct CPlayer {
void saveHit(CPlayer* pVictim, int weapon, int damage, int aiming);
void saveShot(int weapon);
void restartStats(bool all = true);
inline bool IsBot(){
const char* auth= (*g_engfuncs.pfnGetPlayerAuthId)(pEdict);
return ( auth && !strcmp( auth , "BOT" ) );

View File

@ -188,7 +188,7 @@ void ClientUserInfoChanged_Post( edict_t *pEntity, char *infobuffer ) {
const char* name = INFOKEY_VALUE(infobuffer,"name");
const char* oldname = STRING(pEntity->v.netname);
if ( pPlayer->ingame){
if ( pPlayer->ingame ){
if ( strcmp(oldname,name) ) {
if (!tsstats_rank->value)
pPlayer->rank = g_rank.findEntryInRank( name, name );
@ -197,7 +197,6 @@ void ClientUserInfoChanged_Post( edict_t *pEntity, char *infobuffer ) {
}
}
else if ( pPlayer->IsBot() ) {
pPlayer->Connect( "127.0.0.1" );
pPlayer->PutInServer();
}