diff --git a/engine/client/cl_ents.c b/engine/client/cl_ents.c index 046fbaf3c..880cff62d 100644 --- a/engine/client/cl_ents.c +++ b/engine/client/cl_ents.c @@ -2430,13 +2430,13 @@ void CL_ParsePlayerinfo (void) state->hullnum = 1; else state->hullnum = 56; - state->scale = 1*16; + state->scale = 1; state->alpha = 255; state->fatness = 0; #ifdef PEXT_SCALE if (flags & PF_SCALE_Z && cls.fteprotocolextensions & PEXT_SCALE) - state->scale = (float)MSG_ReadByte() / 100; + state->scale = (float)MSG_ReadByte()/50; #endif #ifdef PEXT_TRANS if (flags & PF_TRANS_Z && cls.fteprotocolextensions & PEXT_TRANS) @@ -2776,7 +2776,7 @@ void CL_LinkPlayers (void) ent->scoreboard = NULL; #ifdef PEXT_SCALE - ent->scale = state->scale/16.0f; + ent->scale = state->scale; #endif ent->shaderRGBAf[0] = state->colourmod[0]/32; ent->shaderRGBAf[1] = state->colourmod[1]/32; diff --git a/engine/client/cl_input.c b/engine/client/cl_input.c index 93e029af2..e92a8a0f0 100644 --- a/engine/client/cl_input.c +++ b/engine/client/cl_input.c @@ -1372,7 +1372,7 @@ qboolean CL_SendCmdQW (sizebuf_t *buf) if (plnum) MSG_WriteByte (buf, clc_move); - dontdrop = dontdrop || CL_WriteDeltas(plnum, buf); + dontdrop = CL_WriteDeltas(plnum, buf) || dontdrop; if (!firstsize) firstsize = buf->cursize; diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index fce844b21..328bff47f 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -1264,6 +1264,7 @@ void CL_User_f (void) { int uid; int i; + qboolean found = false; #ifndef CLIENTONLY if (sv.state) @@ -1292,10 +1293,11 @@ void CL_User_f (void) Con_Printf("name: %s\ncolour %i %i\nping: %i\n", cl.players[i].name, cl.players[i].rbottomcolor, cl.players[i].rtopcolor, cl.players[i].ping); else Info_Print (cl.players[i].userinfo); - return; + found = true; } } - Con_TPrintf (TLC_USER_NOUSER); + if (!found) + Con_TPrintf (TLC_USER_NOUSER); } /* diff --git a/engine/client/input.h b/engine/client/input.h index c39eac3b3..61fd3ce52 100644 --- a/engine/client/input.h +++ b/engine/client/input.h @@ -40,6 +40,7 @@ void IN_Accumulate (void); extern cvar_t in_xflip; #endif -/*semi-common, so lets prototype on all*/ +#ifdef _SDL void IN_ActivateMouse(void); -void IN_DeactivateMouse(void); \ No newline at end of file +void IN_DeactivateMouse(void); +#endif diff --git a/engine/common/com_mesh.c b/engine/common/com_mesh.c index bc380744d..64c22f90d 100644 --- a/engine/common/com_mesh.c +++ b/engine/common/com_mesh.c @@ -2144,6 +2144,7 @@ static void *Q1_LoadSkins_GL (daliasskintype_t *pskintype, unsigned int skintran "blendfunc gl_one_minus_src_alpha gl_src_alpha\n" "rgbgen lightingDiffuse\n" "cull disable\n" + "depthwrite\n" "}\n" "}\n"); else if (skintranstype) @@ -2153,6 +2154,7 @@ static void *Q1_LoadSkins_GL (daliasskintype_t *pskintype, unsigned int skintran "map $diffuse\n" "blendfunc gl_src_alpha gl_one_minus_src_alpha\n" "rgbgen lightingDiffuse\n" + "depthwrite\n" "}\n" "}\n"); else diff --git a/engine/common/common.c b/engine/common/common.c index 913c8a5c0..b5aba596a 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -1304,11 +1304,14 @@ void MSG_ReadPos (vec3_t pos) pos[2] = MSG_ReadCoord(); } +#if defined(Q2SERVER) || !defined(SERVERONLY) #define Q2NUMVERTEXNORMALS 162 vec3_t bytedirs[Q2NUMVERTEXNORMALS] = { #include "../client/q2anorms.h" }; +#endif +#ifndef SERVERONLY void MSG_ReadDir (vec3_t dir) { int b; @@ -1321,6 +1324,7 @@ void MSG_ReadDir (vec3_t dir) } VectorCopy (bytedirs[b], dir); } +#endif #ifdef Q2SERVER void MSG_WriteDir (sizebuf_t *sb, vec3_t dir) { diff --git a/engine/server/net_preparse.c b/engine/server/net_preparse.c index 7b9646499..f76a1da10 100644 --- a/engine/server/net_preparse.c +++ b/engine/server/net_preparse.c @@ -906,6 +906,10 @@ void NPP_NQWriteByte(int dest, qbyte data) //replacement write func (nq to qw) case svc_cutscene: ignoreprotocol = true; break; + case 51: + protocollen = 2; + ignoreprotocol = true; + break; default: Con_Printf("NQWriteByte: bad protocol %i\n", (int)data); protocollen = sizeof(buffer); diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index d8ec0f040..775da76f8 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -6959,7 +6959,7 @@ void PF_h2setclass (progfuncs_t *prinst, struct globalvars_s *pr_globals) client->playerclass = NewClass; sprintf(temp,"%d",(int)NewClass); - Info_SetValueForKey (client->userinfo, "playerclass", temp, sizeof(client->userinfo)); + Info_SetValueForKey (client->userinfo, "cl_playerclass", temp, sizeof(client->userinfo)); client->sendinfo = true; } diff --git a/engine/server/sv_ccmds.c b/engine/server/sv_ccmds.c index 318bed13b..97292ac12 100644 --- a/engine/server/sv_ccmds.c +++ b/engine/server/sv_ccmds.c @@ -1766,16 +1766,22 @@ Examine a users info strings */ void SV_User_f (void) { + client_t *cl; + int clnum=-1; + if (Cmd_Argc() != 2) { Con_TPrintf (STL_USERINFOSYNTAX); return; } - if (!SV_SetPlayer ()) - return; + while((cl = SV_GetClientForString(Cmd_Argv(1), &clnum))) + { + Info_Print (cl->userinfo); + } - Info_Print (host_client->userinfo); + if (clnum == -1) + Con_TPrintf (STL_USERIDNOTONSERVER, atoi(Cmd_Argv(1))); } /* diff --git a/engine/server/sv_ents.c b/engine/server/sv_ents.c index ed4da1663..3403034f6 100644 --- a/engine/server/sv_ents.c +++ b/engine/server/sv_ents.c @@ -1217,7 +1217,7 @@ void SV_WritePlayerToClient(sizebuf_t *msg, clstate_t *ent) #ifdef PEXT_SCALE //this is graphics, not physics if (ent->fteext & PEXT_SCALE) { - if (ent->scale) pflags |= PF_SCALE_Z; + if (ent->scale && ent->scale != 1) pflags |= PF_SCALE_Z; } #endif #ifdef PEXT_TRANS diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 6608d748d..24b5a5f41 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -2370,6 +2370,13 @@ client_t *SVC_DirectConnect(void) temp.frameunion.frames = cl->frameunion.frames; //don't touch these. temp.edict = cl->edict; memcpy(cl, newcl, sizeof(client_t)); + cl->name = cl->namebuf; + cl->team = cl->teambuf; + + nextuserid++; // so every client gets a unique id + cl->userid = nextuserid; + + cl->playerclass = 0; cl->frameunion.frames = temp.frameunion.frames; cl->edict = temp.edict; diff --git a/engine/server/sv_send.c b/engine/server/sv_send.c index 8c2c0978d..4837086d6 100644 --- a/engine/server/sv_send.c +++ b/engine/server/sv_send.c @@ -2172,6 +2172,10 @@ void SV_SendClientMessages (void) if (!c->send_message) continue; c->send_message = false; // try putting this after choke? + + if (c->controller) + continue; /*shouldn't have been set*/ + if (!sv.paused && !Netchan_CanPacket (&c->netchan, SV_RateForClient(c))) { c->chokecount++; diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index 0b3f95bab..9dd0bc3ea 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -1491,7 +1491,7 @@ void SV_Begin_Core(client_t *split) client_t *oh; int i; if (progstype == PROG_H2 && split->playerclass) - split->edict->xv->playerclass = host_client->playerclass; //make sure it's set the same as the userinfo + split->edict->xv->playerclass = split->playerclass; //make sure it's set the same as the userinfo #ifdef Q2SERVER if (ge)