1
0
Fork 0
forked from fte/fteqw

Hexen2 fixes, compile fix, and splitscreen fixes although you won't see other players yet - I know why but its not an easy fix, and I don't want to break other things any more than I have to (R_ShouldDraw+external models).

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3581 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2010-08-12 09:04:05 +00:00
parent 8f06a6bda7
commit fd16657900
13 changed files with 44 additions and 14 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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);
}
/*

View file

@ -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);
void IN_DeactivateMouse(void);
#endif

View file

@ -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

View file

@ -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)
{

View file

@ -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);

View file

@ -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;
}

View file

@ -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)));
}
/*

View file

@ -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

View file

@ -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;

View file

@ -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++;

View file

@ -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)