MSG_WriteLong(&net_message, client->colors);
MSG_WriteLong(&net_message, (int)client->edict->v->frags);
MSG_WriteLong(&net_message, (int)(realtime - client->connecttime));
- MSG_WriteString(&net_message, client->netconnection->address);
+ MSG_WriteString(&net_message, client->netconnection ? client->netconnection->address : "botclient");
*((int *)net_message.data) = BigLong(NETFLAG_CTL | (net_message.cursize & NETFLAG_LENGTH_MASK));
NetConn_Write(mysocket, net_message.data, net_message.cursize, peeraddress);
SZ_Clear(&net_message);
}
client = svs.clients + entnum-1;
- if (!client->netconnection)
- return;
PF_VarString(1, string, sizeof(string));
MSG_WriteChar(&client->message,svc_print);
MSG_WriteString(&client->message, string);
}
client = svs.clients + entnum-1;
- if (!client->netconnection)
- return;
PF_VarString(1, string, sizeof(string));
MSG_WriteChar(&client->message,svc_centerprint);
MSG_WriteString(&client->message, string);
str = G_STRING(OFS_PARM1);
old = host_client;
- if ((host_client = svs.clients + entnum-1) && host_client->netconnection)
- Host_ClientCommands ("%s", str);
+ host_client = svs.clients + entnum-1;
+ Host_ClientCommands ("%s", str);
host_client = old;
}
for (j = 0, client = svs.clients;j < svs.maxclients;j++, client++)
{
- if (client->netconnection)
+ if (client->active)
{
MSG_WriteChar (&client->message, svc_lightstyle);
MSG_WriteChar (&client->message,style);
PF_ceil, // #38 float(float v) ceil
NULL, // #39
PF_checkbottom, // #40 float(entity e) checkbottom
-PF_pointcontents , // #41 float(vector v) pointcontents
+PF_pointcontents, // #41 float(vector v) pointcontents
NULL, // #42
PF_fabs, // #43 float(float f) fabs
PF_aim, // #44 vector(entity e, float speed) aim
}
client = svs.clients + clientnum;
- if (!client->netconnection)
- return;
VM_VarString(1, string, sizeof(string));
MSG_WriteChar(&client->message,svc_print);
MSG_WriteString(&client->message, string);
// send serverinfo to all connected clients
for (i = 0, host_client = svs.clients;i < svs.maxclients;i++, host_client++)
- if (host_client->netconnection)
+ if (host_client->active)
SV_SendServerinfo(host_client);
Con_DPrint("Server spawned.\n");