view lowering now does actually lower view.

This commit is contained in:
Joseph Carter 2000-05-16 04:59:51 +00:00
parent 1d26c02826
commit 00f00185f8
3 changed files with 30 additions and 13 deletions

View file

@ -275,6 +275,7 @@ typedef struct
char levelname[40]; // for display on solo scoreboard
int playernum;
int stdver;
// refresh related state
struct model_s *worldmodel; // cl_entitites[0].model
@ -382,7 +383,7 @@ extern lightstyle_t cl_lightstyle[MAX_LIGHTSTYLES];
extern dlight_t cl_dlights[MAX_DLIGHTS];
extern qboolean nomaster;
extern float server_version; // version of server we connected to
extern char *server_version; // version of server we connected to
//=============================================================================

View file

@ -203,7 +203,7 @@ jmp_buf host_abort;
void Master_Connect_f (void);
float server_version = 0; // version of server we connected to
char *server_version = NULL; // version of server we connected to
char emodel_name[] =
{ 'e' ^ 0xff, 'm' ^ 0xff, 'o' ^ 0xff, 'd' ^ 0xff, 'e' ^ 0xff, 'l' ^ 0xff, 0 };
@ -640,7 +640,6 @@ Sent by server when serverinfo changes
void CL_FullServerinfo_f (void)
{
char *p;
float v;
if (Cmd_Argc() != 2)
{
@ -648,15 +647,28 @@ void CL_FullServerinfo_f (void)
return;
}
Con_DPrintf("Cmd_Argv(1): '%s'\n", Cmd_Argv(1));
strcpy (cl.serverinfo, Cmd_Argv(1));
Con_DPrintf("cl.serverinfo: '%s'\n", cl.serverinfo);
if ((p = Info_ValueForKey(cl.serverinfo, "*vesion")) && *p) {
v = Q_atof(p);
if (v) {
if (!server_version)
Con_Printf("Version %1.2f Server\n", v);
server_version = v;
if ((p = Info_ValueForKey(cl.serverinfo, "*version")) && *p)
{
if (server_version == NULL)
Con_Printf("QuakeForge Version %s Server\n", p);
server_version = strdup(p);
} else if ((p = Info_ValueForKey(cl.serverinfo, "*version")) && *p)
{
if (server_version == NULL)
Con_Printf("Version %s Server\n", p);
server_version = strdup(p);
}
if ((p = Info_ValueForKey(cl.serverinfo, "*qsg_standard")) && *p)
{
if ((cl.stdver = atoi (p)))
Con_Printf("QSG standards version %i\n", cl.stdver);
else
Con_Printf("Invalid standards version: %s", p);
}
}

View file

@ -764,6 +764,10 @@ void V_CalcRefdef (void)
vec3_t forward, right, up;
float bob;
static float oldz = 0;
int zofs = 22;
if (cl.stdver)
zofs = cl.stats[STAT_VIEWHEIGHT];
V_DriftPitch ();
@ -793,7 +797,7 @@ void V_CalcRefdef (void)
else if (view_message->flags & PF_DEAD)
r_refdef.vieworg[2] -= 16; // corpse view height
else
r_refdef.vieworg[2] += 22; // view height
r_refdef.vieworg[2] += zofs; // view height
if (view_message->flags & PF_DEAD) // PF_GIB will also set PF_DEAD
r_refdef.viewangles[ROLL] = 80; // dead view angle
@ -808,7 +812,7 @@ void V_CalcRefdef (void)
CalcGunAngle ();
VectorCopy (cl.simorg, view->origin);
view->origin[2] += 22;
view->origin[2] += zofs;
for (i=0 ; i<3 ; i++)
{