mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-31 17:21:46 +00:00
view lowering now does actually lower view.
This commit is contained in:
parent
1d26c02826
commit
00f00185f8
3 changed files with 30 additions and 13 deletions
|
@ -275,6 +275,7 @@ typedef struct
|
||||||
|
|
||||||
char levelname[40]; // for display on solo scoreboard
|
char levelname[40]; // for display on solo scoreboard
|
||||||
int playernum;
|
int playernum;
|
||||||
|
int stdver;
|
||||||
|
|
||||||
// refresh related state
|
// refresh related state
|
||||||
struct model_s *worldmodel; // cl_entitites[0].model
|
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 dlight_t cl_dlights[MAX_DLIGHTS];
|
||||||
|
|
||||||
extern qboolean nomaster;
|
extern qboolean nomaster;
|
||||||
extern float server_version; // version of server we connected to
|
extern char *server_version; // version of server we connected to
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ jmp_buf host_abort;
|
||||||
|
|
||||||
void Master_Connect_f (void);
|
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[] =
|
char emodel_name[] =
|
||||||
{ 'e' ^ 0xff, 'm' ^ 0xff, 'o' ^ 0xff, 'd' ^ 0xff, 'e' ^ 0xff, 'l' ^ 0xff, 0 };
|
{ '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)
|
void CL_FullServerinfo_f (void)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
float v;
|
|
||||||
|
|
||||||
if (Cmd_Argc() != 2)
|
if (Cmd_Argc() != 2)
|
||||||
{
|
{
|
||||||
|
@ -648,15 +647,28 @@ void CL_FullServerinfo_f (void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Con_DPrintf("Cmd_Argv(1): '%s'\n", Cmd_Argv(1));
|
||||||
strcpy (cl.serverinfo, 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) {
|
if ((p = Info_ValueForKey(cl.serverinfo, "*version")) && *p)
|
||||||
v = Q_atof(p);
|
{
|
||||||
if (v) {
|
if (server_version == NULL)
|
||||||
if (!server_version)
|
Con_Printf("QuakeForge Version %s Server\n", p);
|
||||||
Con_Printf("Version %1.2f Server\n", v);
|
server_version = strdup(p);
|
||||||
server_version = v;
|
} 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -763,7 +763,11 @@ void V_CalcRefdef (void)
|
||||||
int i;
|
int i;
|
||||||
vec3_t forward, right, up;
|
vec3_t forward, right, up;
|
||||||
float bob;
|
float bob;
|
||||||
static float oldz = 0;
|
static float oldz = 0;
|
||||||
|
int zofs = 22;
|
||||||
|
|
||||||
|
if (cl.stdver)
|
||||||
|
zofs = cl.stats[STAT_VIEWHEIGHT];
|
||||||
|
|
||||||
V_DriftPitch ();
|
V_DriftPitch ();
|
||||||
|
|
||||||
|
@ -793,7 +797,7 @@ void V_CalcRefdef (void)
|
||||||
else if (view_message->flags & PF_DEAD)
|
else if (view_message->flags & PF_DEAD)
|
||||||
r_refdef.vieworg[2] -= 16; // corpse view height
|
r_refdef.vieworg[2] -= 16; // corpse view height
|
||||||
else
|
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
|
if (view_message->flags & PF_DEAD) // PF_GIB will also set PF_DEAD
|
||||||
r_refdef.viewangles[ROLL] = 80; // dead view angle
|
r_refdef.viewangles[ROLL] = 80; // dead view angle
|
||||||
|
@ -808,7 +812,7 @@ void V_CalcRefdef (void)
|
||||||
CalcGunAngle ();
|
CalcGunAngle ();
|
||||||
|
|
||||||
VectorCopy (cl.simorg, view->origin);
|
VectorCopy (cl.simorg, view->origin);
|
||||||
view->origin[2] += 22;
|
view->origin[2] += zofs;
|
||||||
|
|
||||||
for (i=0 ; i<3 ; i++)
|
for (i=0 ; i<3 ; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue