summaryrefslogtreecommitdiff
path: root/src/server/sv_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/sv_init.c')
-rw-r--r--src/server/sv_init.c47
1 files changed, 4 insertions, 43 deletions
diff --git a/src/server/sv_init.c b/src/server/sv_init.c
index 76cb8297..22f45729 100644
--- a/src/server/sv_init.c
+++ b/src/server/sv_init.c
@@ -348,7 +348,6 @@ This is NOT called for map_restart
void SV_SpawnServer( char *server, qboolean killBots ) {
int i;
int checksum;
- qboolean isBot;
char systemInfo[16384];
const char *p;
@@ -441,7 +440,6 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
for (i = 0;i < 3; i++)
{
VM_Call (gvm, GAME_RUN_FRAME, sv.time);
- SV_BotFrame (sv.time);
sv.time += 100;
svs.time += 100;
}
@@ -454,51 +452,22 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
if (svs.clients[i].state >= CS_CONNECTED) {
char *denied;
- if ( svs.clients[i].netchan.remoteAddress.type == NA_BOT ) {
- if ( killBots ) {
- SV_DropClient( &svs.clients[i], "" );
- continue;
- }
- isBot = qtrue;
- }
- else {
- isBot = qfalse;
- }
-
// connect the client again
- denied = VM_ExplicitArgPtr( gvm, VM_Call( gvm, GAME_CLIENT_CONNECT, i, qfalse, isBot ) ); // firstTime = qfalse
+ denied = VM_ExplicitArgPtr( gvm, VM_Call( gvm, GAME_CLIENT_CONNECT, i, qfalse ) ); // firstTime = qfalse
if ( denied ) {
// this generally shouldn't happen, because the client
// was connected before the level change
SV_DropClient( &svs.clients[i], denied );
} else {
- if( !isBot ) {
- // when we get the next packet from a connected client,
- // the new gamestate will be sent
- svs.clients[i].state = CS_CONNECTED;
- }
- else {
- client_t *client;
- sharedEntity_t *ent;
-
- client = &svs.clients[i];
- client->state = CS_ACTIVE;
- ent = SV_GentityNum( i );
- ent->s.number = i;
- client->gentity = ent;
-
- client->deltaMessage = -1;
- client->nextSnapshotTime = svs.time; // generate a snapshot immediately
-
- VM_Call( gvm, GAME_CLIENT_BEGIN, i );
- }
+ // when we get the next packet from a connected client,
+ // the new gamestate will be sent
+ svs.clients[i].state = CS_CONNECTED;
}
}
}
// run another frame to allow things to look at all the players
VM_Call (gvm, GAME_RUN_FRAME, sv.time);
- SV_BotFrame (sv.time);
sv.time += 100;
svs.time += 100;
@@ -558,8 +527,6 @@ SV_Init
Only called at main exe startup, not for each game
===============
*/
-void SV_BotInitBotLib(void);
-
void SV_Init (void) {
SV_AddOperatorCommands ();
@@ -605,12 +572,6 @@ void SV_Init (void) {
sv_mapChecksum = Cvar_Get ("sv_mapChecksum", "", CVAR_ROM);
sv_lanForceRate = Cvar_Get ("sv_lanForceRate", "1", CVAR_ARCHIVE );
sv_dequeuePeriod = Cvar_Get ("sv_dequeuePeriod", "500", CVAR_ARCHIVE );
-
- // initialize bot cvars so they are listed and can be set before loading the botlib
- SV_BotInitCvars();
-
- // init the botlib here because we need the pre-compiler in the UI
- SV_BotInitBotLib();
}