diff --git a/engine/server/net_preparse.c b/engine/server/net_preparse.c index e883de5a7..83545fb39 100644 --- a/engine/server/net_preparse.c +++ b/engine/server/net_preparse.c @@ -259,14 +259,22 @@ void NPP_NQWriteByte(int dest, qbyte data) //replacement write func (nq to qw) NPP_NQCheckDest(dest); #ifdef NQPROT - if (dest == MSG_ONE) { + if (dest == MSG_ONE) + { client_t *cl = Write_GetClient(); - if (cl && !ISQWCLIENT(cl)) + if (cl) { - ClientReliableCheckBlock(cl, sizeof(qbyte)); - ClientReliableWrite_Byte(cl, data); + if (cl->protocol == SCP_BAD) // is a bot + return; + else if (!ISQWCLIENT(cl)) + { + ClientReliableCheckBlock(cl, sizeof(qbyte)); + ClientReliableWrite_Byte(cl, data); + return; + } } - } else + } + else MSG_WriteByte (NQWriteDest(dest), data); #endif @@ -933,7 +941,7 @@ void NPP_QWCheckDest(int dest) { if (dest == MSG_ONE) { - /*client_t *cl = Write_GetClient(); +/* client_t *cl = Write_GetClient(); if (!cl) { Con_Printf("Not a client\n"); @@ -945,7 +953,7 @@ void NPP_QWCheckDest(int dest) NPP_QWFlush(); } cldest = cl; - */ +*/ } else { @@ -967,15 +975,22 @@ void NPP_QWWriteByte(int dest, qbyte data) //replacement write func (nq to qw) NPP_QWCheckDest(dest); #ifdef NQPROT - if (dest == MSG_ONE) { + if (dest == MSG_ONE) + { client_t *cl = Write_GetClient(); - if (cl && ISQWCLIENT(cl)) + if (cl) { - ClientReliableCheckBlock(cl, sizeof(qbyte)); - ClientReliableWrite_Byte(cl, data); - return; + if (ISQWCLIENT(cl)) + { + ClientReliableCheckBlock(cl, sizeof(qbyte)); + ClientReliableWrite_Byte(cl, data); + return; + } + else if (cl->protocol == SCP_BAD) // is a bot + return; } - } else + } + else MSG_WriteByte (QWWriteDest(dest), data); #endif if (!bufferlen) //new message section diff --git a/engine/server/sv_ents.c b/engine/server/sv_ents.c index 2f7d449bd..94cd547ee 100644 --- a/engine/server/sv_ents.c +++ b/engine/server/sv_ents.c @@ -1329,7 +1329,7 @@ void SV_WritePlayerToClient(sizebuf_t *msg, clstate_t *ent) { // don't show the corpse looking around... cmd.angles[0] = 0; cmd.angles[1] = ent->angles[1]*65535/360; - cmd.angles[0] = 0; + cmd.angles[2] = 0; } cmd.buttons = 0; // never send buttons @@ -1621,11 +1621,10 @@ void SV_WritePlayersToClient (client_t *client, edict_t *clent, qbyte *pvs, size for (j=0,cl=svs.clients ; jstate && (cl->name[0] || cl->protocol == SCP_BAD); if (cl->state != cs_spawned) //this includes bots - if (!isbot || progstype == PROG_QW) //unless they're NQ bots... - continue; + continue; + isbot = (cl->name[0] || cl->protocol == SCP_BAD); ent = cl->edict; if (cl->viewent && ent == clent) {