various mvd fixes for bots, especially getting the angles written

This commit is contained in:
Bill Currie 2004-04-06 22:02:45 +00:00
parent cd8486accc
commit c188159384
6 changed files with 16 additions and 13 deletions

View file

@ -750,9 +750,11 @@ SV_ConSay (const char *prefix, client_t *client)
text->str[j++] |= 0x80; // non-bold text
if (client) {
SV_ClientPrintf (1, client, PRINT_CHAT, "\n"); // bell
SV_ClientPrintf (1, client, PRINT_HIGH, "%s\n", text->str);
SV_ClientPrintf (1, client, PRINT_CHAT, "%s", ""); // bell
if (client->state >= cs_zombie) {
SV_ClientPrintf (1, client, PRINT_CHAT, "\n"); // bell
SV_ClientPrintf (1, client, PRINT_HIGH, "%s\n", text->str);
SV_ClientPrintf (1, client, PRINT_CHAT, "%s", ""); // bell
}
} else {
for (j = 0, client = svs.clients; j < MAX_CLIENTS; j++, client++) {
if (client->state < cs_zombie)

View file

@ -354,7 +354,6 @@ SV_DemoWritePackets (int num)
if (flags & (DF_ANGLES << j))
MSG_WriteAngle16 (&msg, angles[j]);
if (flags & DF_MODEL)
MSG_WriteByte (&msg, cl->info.model);
@ -729,7 +728,8 @@ SV_PrintTeams (void)
// count teams and players
for (i = 0; i < MAX_CLIENTS; i++) {
if (svs.clients[i].state != cs_spawned)
if (svs.clients[i].state != cs_spawned
&& svs.clients[i].state != cs_server)
continue;
if (svs.clients[i].spectator)
continue;

View file

@ -331,7 +331,7 @@ SV_DropClient (client_t *drop)
// add the disconnect
MSG_WriteByte (&drop->netchan.message, svc_disconnect);
if (drop->state == cs_spawned) {
if (drop->state == cs_spawned) {//FIXME cs_server?
if (!drop->spectator) {
// call the prog function for removing a client
// this will set the body to a dead frame, among other things

View file

@ -254,7 +254,7 @@ PF_sprint (progs_t *pr)
client = &svs.clients[entnum - 1];
if (client->state == cs_server)
if (client->state == cs_server) //FIXME record to mvd?
return;
s = PF_VarString (pr, 2);
@ -286,7 +286,7 @@ PF_centerprint (progs_t *pr)
cl = &svs.clients[entnum - 1];
if (cl->state == cs_server)
if (cl->state == cs_server) //FIXME record to mvd?
return;
s = PF_VarString (pr, 1);
@ -580,7 +580,7 @@ PF_stuffcmd (progs_t *pr)
cl = &svs.clients[entnum - 1];
if (cl->state == cs_server)
if (cl->state == cs_server) //FIXME record to mvd?
return;
str = P_GSTRING (pr, 1);
@ -1898,6 +1898,7 @@ PR_SV_UserCmd (progs_t *pr)
VectorCopy (P_VECTOR (pr, 3), &ucmd.forwardmove); //FIXME right order?
ucmd.buttons = P_INT (pr, 4);
ucmd.impulse = P_INT (pr, 5);
cl->localtime = sv.time;
SV_PreRunCmd ();
SV_RunCmd (&ucmd, 0);
SV_PostRunCmd ();

View file

@ -101,7 +101,7 @@ SV_FlushRedirect (void)
if (sv_redirected > RD_MOD) {
cl = svs.clients + sv_redirected - RD_MOD - 1;
if (cl->state != cs_spawned)
if (cl->state != cs_spawned) //FIXME record to mvd?
count = 0;
} else {
cl = host_client;
@ -846,7 +846,7 @@ SV_SendDemoMessage (void)
demo.forceFrame = 0;
for (i = 0, c = svs.clients ; i<MAX_CLIENTS ; i++, c++) {
if (c->state != cs_spawned)
if (c->state != cs_spawned && c->state != cs_server)
continue; // datagrams only go to spawned
cls |= 1 << i;
@ -1007,7 +1007,7 @@ SV_BroadcastPrintf (int level, const char *fmt, ...)
for (i = 0, cl = svs.clients; i < MAX_CLIENTS; i++, cl++) {
if (level < cl->messagelevel)
continue;
if (cl->state < cs_zombie)
if (cl->state < cs_zombie) //FIXME record to mvd
continue;
SV_PrintToClient (cl, level, string);

View file

@ -848,7 +848,7 @@ SV_Say (qboolean team)
SV_Printf ("%s", text->str);
for (j = 0, client = svs.clients; j < MAX_CLIENTS; j++, client++) {
if (client->state < cs_connected) // Clients connecting can hear.
if (client->state < cs_connected) // Clients connecting can hear. //FIXME record to mvd?
continue;
if (host_client->spectator && !sv_spectalk->int_val)
if (!client->spectator)