mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-21 11:11:37 +00:00
Whitespace.
This commit is contained in:
parent
95515e28d7
commit
05d3aaa0bb
6 changed files with 130 additions and 129 deletions
|
@ -92,12 +92,12 @@ vectoangles (vec3_t vec, vec3_t ang)
|
||||||
else
|
else
|
||||||
pitch = 270;
|
pitch = 270;
|
||||||
} else {
|
} else {
|
||||||
yaw = (int) (atan2 (vec[1], vec[0]) * 180 / M_PI);
|
yaw = (int) (atan2 (vec[1], vec[0]) * (180.0 / M_PI));
|
||||||
if (yaw < 0)
|
if (yaw < 0)
|
||||||
yaw += 360;
|
yaw += 360;
|
||||||
|
|
||||||
forward = sqrt (vec[0] * vec[0] + vec[1] * vec[1]);
|
forward = sqrt (vec[0] * vec[0] + vec[1] * vec[1]);
|
||||||
pitch = (int) (atan2 (vec[2], forward) * 180 / M_PI);
|
pitch = (int) (atan2 (vec[2], forward) * (180.0 / M_PI));
|
||||||
if (pitch < 0)
|
if (pitch < 0)
|
||||||
pitch += 360;
|
pitch += 360;
|
||||||
}
|
}
|
||||||
|
@ -235,8 +235,7 @@ static qboolean
|
||||||
InitFlyby (player_state_t * self, player_state_t * player, int checkvis)
|
InitFlyby (player_state_t * self, player_state_t * player, int checkvis)
|
||||||
{
|
{
|
||||||
float f, max;
|
float f, max;
|
||||||
vec3_t vec, vec2;
|
vec3_t forward, right, up, vec, vec2;
|
||||||
vec3_t forward, right, up;
|
|
||||||
|
|
||||||
VectorCopy (player->viewangles, vec);
|
VectorCopy (player->viewangles, vec);
|
||||||
vec[0] = 0;
|
vec[0] = 0;
|
||||||
|
@ -606,14 +605,14 @@ Cam_Reset (void)
|
||||||
void
|
void
|
||||||
CL_Cam_Init_Cvars (void)
|
CL_Cam_Init_Cvars (void)
|
||||||
{
|
{
|
||||||
cl_hightrack = Cvar_Get ("cl_hightrack", "0", CVAR_NONE, NULL, "view the "
|
|
||||||
"player who has the most frags while you are in "
|
|
||||||
"spectator mode.");
|
|
||||||
cl_chasecam = Cvar_Get ("cl_chasecam", "0", CVAR_NONE, NULL, "get first "
|
|
||||||
"person view of the person you are tracking in "
|
|
||||||
"spectator mode");
|
|
||||||
cl_camera_maxpitch = Cvar_Get ("cl_camera_maxpitch", "10", CVAR_NONE, NULL,
|
cl_camera_maxpitch = Cvar_Get ("cl_camera_maxpitch", "10", CVAR_NONE, NULL,
|
||||||
"highest camera pitch in spectator mode");
|
"highest camera pitch in spectator mode");
|
||||||
cl_camera_maxyaw = Cvar_Get ("cl_camera_maxyaw", "30", CVAR_NONE, NULL,
|
cl_camera_maxyaw = Cvar_Get ("cl_camera_maxyaw", "30", CVAR_NONE, NULL,
|
||||||
"highest camera yaw in spectator mode");
|
"highest camera yaw in spectator mode");
|
||||||
|
cl_chasecam = Cvar_Get ("cl_chasecam", "0", CVAR_NONE, NULL, "get first "
|
||||||
|
"person view of the person you are tracking in "
|
||||||
|
"spectator mode");
|
||||||
|
cl_hightrack = Cvar_Get ("cl_hightrack", "0", CVAR_NONE, NULL, "view the "
|
||||||
|
"player who has the most frags while you are in "
|
||||||
|
"spectator mode.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,7 +259,8 @@ CL_GetDemoMessage (void)
|
||||||
case dem_read:
|
case dem_read:
|
||||||
// get the next message
|
// get the next message
|
||||||
Qread (cls.demofile, &net_message->message->cursize, 4);
|
Qread (cls.demofile, &net_message->message->cursize, 4);
|
||||||
net_message->message->cursize = LittleLong (net_message->message->cursize);
|
net_message->message->cursize = LittleLong
|
||||||
|
(net_message->message->cursize);
|
||||||
// Con_Printf("read: %ld bytes\n", net_message->message->cursize);
|
// Con_Printf("read: %ld bytes\n", net_message->message->cursize);
|
||||||
if (net_message->message->cursize > MAX_MSGLEN)
|
if (net_message->message->cursize > MAX_MSGLEN)
|
||||||
// Sys_Error ("Demo message > MAX_MSGLEN");
|
// Sys_Error ("Demo message > MAX_MSGLEN");
|
||||||
|
@ -843,8 +844,8 @@ void CL_TimeFrames_DumpLog (void)
|
||||||
{
|
{
|
||||||
char e_path[MAX_OSPATH];
|
char e_path[MAX_OSPATH];
|
||||||
char *filename = "timeframes.txt";
|
char *filename = "timeframes.txt";
|
||||||
long frame;
|
|
||||||
int i;
|
int i;
|
||||||
|
long frame;
|
||||||
VFile *outputfile;
|
VFile *outputfile;
|
||||||
|
|
||||||
if (cl_timeframes_isactive == 0)
|
if (cl_timeframes_isactive == 0)
|
||||||
|
|
|
@ -57,9 +57,6 @@
|
||||||
#include "r_dynamic.h"
|
#include "r_dynamic.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
|
|
||||||
extern cvar_t *cl_predict_players;
|
|
||||||
extern cvar_t *cl_solid_players;
|
|
||||||
|
|
||||||
static struct predicted_player {
|
static struct predicted_player {
|
||||||
int flags;
|
int flags;
|
||||||
qboolean active;
|
qboolean active;
|
||||||
|
@ -70,6 +67,9 @@ entity_t cl_packet_ents[512]; // FIXME: magic number
|
||||||
entity_t cl_flag_ents[MAX_CLIENTS];
|
entity_t cl_flag_ents[MAX_CLIENTS];
|
||||||
entity_t cl_player_ents[MAX_CLIENTS];
|
entity_t cl_player_ents[MAX_CLIENTS];
|
||||||
|
|
||||||
|
extern cvar_t *cl_predict_players;
|
||||||
|
extern cvar_t *cl_solid_players;
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CL_ClearEnts ()
|
CL_ClearEnts ()
|
||||||
|
@ -394,15 +394,16 @@ CL_ParsePacketEntities (qboolean delta)
|
||||||
void
|
void
|
||||||
CL_LinkPacketEntities (void)
|
CL_LinkPacketEntities (void)
|
||||||
{
|
{
|
||||||
|
int pnum, i;
|
||||||
dlight_t *dl;
|
dlight_t *dl;
|
||||||
entity_t **ent;
|
entity_t **ent;
|
||||||
entity_state_t *s1;
|
entity_state_t *s1;
|
||||||
int pnum, i;
|
|
||||||
extern int cl_h_playerindex, cl_gib1index, cl_gib2index, cl_gib3index;
|
|
||||||
extern int cl_playerindex;
|
|
||||||
model_t *model;
|
model_t *model;
|
||||||
packet_entities_t *pack;
|
packet_entities_t *pack;
|
||||||
|
|
||||||
|
extern int cl_h_playerindex, cl_gib1index, cl_gib2index, cl_gib3index;
|
||||||
|
extern int cl_playerindex;
|
||||||
|
|
||||||
pack = &cl.frames[cls.netchan.incoming_sequence &
|
pack = &cl.frames[cls.netchan.incoming_sequence &
|
||||||
UPDATE_MASK].packet_entities;
|
UPDATE_MASK].packet_entities;
|
||||||
|
|
||||||
|
@ -566,8 +567,8 @@ CL_ClearProjectiles (void)
|
||||||
void
|
void
|
||||||
CL_ParseProjectiles (void)
|
CL_ParseProjectiles (void)
|
||||||
{
|
{
|
||||||
int i, c, j;
|
|
||||||
byte bits[6];
|
byte bits[6];
|
||||||
|
int i, c, j;
|
||||||
projectile_t *pr;
|
projectile_t *pr;
|
||||||
|
|
||||||
c = MSG_ReadByte (net_message);
|
c = MSG_ReadByte (net_message);
|
||||||
|
@ -593,8 +594,8 @@ CL_ParseProjectiles (void)
|
||||||
void
|
void
|
||||||
CL_LinkProjectiles (void)
|
CL_LinkProjectiles (void)
|
||||||
{
|
{
|
||||||
entity_t **ent;
|
|
||||||
int i;
|
int i;
|
||||||
|
entity_t **ent;
|
||||||
projectile_t *pr;
|
projectile_t *pr;
|
||||||
|
|
||||||
for (i = 0, pr = cl_projectiles; i < cl_num_projectiles; i++, pr++) {
|
for (i = 0, pr = cl_projectiles; i < cl_num_projectiles; i++, pr++) {
|
||||||
|
@ -697,9 +698,9 @@ CL_ParsePlayerinfo (void)
|
||||||
void
|
void
|
||||||
CL_AddFlagModels (entity_t *ent, int team)
|
CL_AddFlagModels (entity_t *ent, int team)
|
||||||
{
|
{
|
||||||
entity_t **newent;
|
|
||||||
float f;
|
float f;
|
||||||
int i;
|
int i;
|
||||||
|
entity_t **newent;
|
||||||
vec3_t v_forward, v_right, v_up;
|
vec3_t v_forward, v_right, v_up;
|
||||||
|
|
||||||
if (cl_flagindex == -1)
|
if (cl_flagindex == -1)
|
||||||
|
@ -773,9 +774,9 @@ void
|
||||||
CL_LinkPlayers (void)
|
CL_LinkPlayers (void)
|
||||||
{
|
{
|
||||||
double playertime;
|
double playertime;
|
||||||
|
int msec, oldphysent, i, j;
|
||||||
entity_t **ent;
|
entity_t **ent;
|
||||||
frame_t *frame;
|
frame_t *frame;
|
||||||
int msec, oldphysent, i, j;
|
|
||||||
player_info_t *info;
|
player_info_t *info;
|
||||||
player_state_t exact;
|
player_state_t exact;
|
||||||
player_state_t *state;
|
player_state_t *state;
|
||||||
|
@ -891,9 +892,9 @@ CL_LinkPlayers (void)
|
||||||
void
|
void
|
||||||
CL_SetSolidEntities (void)
|
CL_SetSolidEntities (void)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
entity_state_t *state;
|
entity_state_t *state;
|
||||||
frame_t *frame;
|
frame_t *frame;
|
||||||
int i;
|
|
||||||
packet_entities_t *pak;
|
packet_entities_t *pak;
|
||||||
|
|
||||||
pmove.physents[0].model = cl.worldmodel;
|
pmove.physents[0].model = cl.worldmodel;
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
|
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
|
|
||||||
#include "host.h"
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
#include "host.h"
|
||||||
|
|
||||||
|
|
||||||
qboolean
|
qboolean
|
||||||
|
@ -47,8 +47,8 @@ ServerPaused (void)
|
||||||
void
|
void
|
||||||
SV_Error (char *error, ...)
|
SV_Error (char *error, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
|
||||||
static char string[1024];
|
static char string[1024];
|
||||||
|
va_list argptr;
|
||||||
|
|
||||||
va_start (argptr, error);
|
va_start (argptr, error);
|
||||||
vsnprintf (string, sizeof (string), error, argptr);
|
vsnprintf (string, sizeof (string), error, argptr);
|
||||||
|
|
|
@ -89,7 +89,7 @@ CL_PredictUsercmd (player_state_t * from, player_state_t * to, usercmd_t *u,
|
||||||
|
|
||||||
PlayerMove ();
|
PlayerMove ();
|
||||||
// for (i=0 ; i<3 ; i++)
|
// for (i=0 ; i<3 ; i++)
|
||||||
// pmove.origin[i] = ((int)(pmove.origin[i]*8))*0.125;
|
// pmove.origin[i] = ((int)(pmove.origin[i] * 8)) * 0.125;
|
||||||
to->waterjumptime = pmove.waterjumptime;
|
to->waterjumptime = pmove.waterjumptime;
|
||||||
to->oldbuttons = pmove.oldbuttons; // Tonik
|
to->oldbuttons = pmove.oldbuttons; // Tonik
|
||||||
// to->oldbuttons = pmove.cmd.buttons;
|
// to->oldbuttons = pmove.cmd.buttons;
|
||||||
|
@ -104,8 +104,8 @@ void
|
||||||
CL_PredictMove (void)
|
CL_PredictMove (void)
|
||||||
{
|
{
|
||||||
float f;
|
float f;
|
||||||
frame_t *from, *to = NULL;
|
|
||||||
int oldphysent, i;
|
int oldphysent, i;
|
||||||
|
frame_t *from, *to = NULL;
|
||||||
|
|
||||||
if (cl_pushlatency->value > 0)
|
if (cl_pushlatency->value > 0)
|
||||||
Cvar_Set (cl_pushlatency, "0");
|
Cvar_Set (cl_pushlatency, "0");
|
||||||
|
@ -215,10 +215,10 @@ CL_PredictMove (void)
|
||||||
void
|
void
|
||||||
CL_Prediction_Init_Cvars (void)
|
CL_Prediction_Init_Cvars (void)
|
||||||
{
|
{
|
||||||
cl_pushlatency = Cvar_Get ("pushlatency", "-999", CVAR_NONE, NULL,
|
|
||||||
"How much prediction should the client make");
|
|
||||||
cl_nopred = Cvar_Get ("cl_nopred", "0", CVAR_NONE, NULL,
|
cl_nopred = Cvar_Get ("cl_nopred", "0", CVAR_NONE, NULL,
|
||||||
"Set to turn off client prediction");
|
"Set to turn off client prediction");
|
||||||
cl_nostatpred = Cvar_Get ("cl_nostatpred", "0", CVAR_NONE, NULL,
|
cl_nostatpred = Cvar_Get ("cl_nostatpred", "0", CVAR_NONE, NULL,
|
||||||
"Set to turn off static player prediction");
|
"Set to turn off static player prediction");
|
||||||
|
cl_pushlatency = Cvar_Get ("pushlatency", "-999", CVAR_NONE, NULL,
|
||||||
|
"How much prediction should the client make");
|
||||||
}
|
}
|
||||||
|
|
|
@ -413,7 +413,7 @@ V_CalcBlend (void)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < NUM_CSHIFTS; i++) {
|
for (i = 0; i < NUM_CSHIFTS; i++) {
|
||||||
a2 = cl.cshifts[i].percent / 255.0;
|
a2 = cl.cshifts[i].percent * (1.0 / 255.0);
|
||||||
|
|
||||||
if (!a2)
|
if (!a2)
|
||||||
continue;
|
continue;
|
||||||
|
@ -435,9 +435,9 @@ V_CalcBlend (void)
|
||||||
b *= a2;
|
b *= a2;
|
||||||
}
|
}
|
||||||
|
|
||||||
v_blend[0] = min (r, 255.0) / 255.0;
|
v_blend[0] = min (r, 255.0) * (1.0 / 255.0);
|
||||||
v_blend[1] = min (g, 255.0) / 255.0;
|
v_blend[1] = min (g, 255.0) * (1.0 / 255.0);
|
||||||
v_blend[2] = min (b, 255.0) / 255.0;
|
v_blend[2] = min (b, 255.0) * (1.0 / 255.0);
|
||||||
v_blend[3] = bound (0.0, a, 1.0);
|
v_blend[3] = bound (0.0, a, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,9 +646,9 @@ V_CalcRefdef (void)
|
||||||
// never let it sit exactly on a node line, because a water plane can
|
// never let it sit exactly on a node line, because a water plane can
|
||||||
// disappear when viewed with the eye exactly on it.
|
// disappear when viewed with the eye exactly on it.
|
||||||
// server protocol only specifies to 1/8 pixel, so add 1/16 in each axis
|
// server protocol only specifies to 1/8 pixel, so add 1/16 in each axis
|
||||||
r_refdef.vieworg[0] += 1.0 / 16;
|
r_refdef.vieworg[0] += (1.0 / 16.0);
|
||||||
r_refdef.vieworg[1] += 1.0 / 16;
|
r_refdef.vieworg[1] += (1.0 / 16.0);
|
||||||
r_refdef.vieworg[2] += 1.0 / 16;
|
r_refdef.vieworg[2] += (1.0 / 16.0);
|
||||||
|
|
||||||
VectorCopy (cl.simangles, r_refdef.viewangles);
|
VectorCopy (cl.simangles, r_refdef.viewangles);
|
||||||
V_CalcViewRoll ();
|
V_CalcViewRoll ();
|
||||||
|
@ -766,15 +766,15 @@ V_RenderView (void)
|
||||||
void
|
void
|
||||||
V_Init (void)
|
V_Init (void)
|
||||||
{
|
{
|
||||||
Cmd_AddCommand ("v_cshift", V_cshift_f, "This adjusts all of the colors "
|
|
||||||
"currently being displayed.\n"
|
|
||||||
"Used when you are underwater, hit, have the Ring of "
|
|
||||||
"Shadows, or Quad Damage. (v_cshift r g b intensity)");
|
|
||||||
Cmd_AddCommand ("bf", V_BonusFlash_f, "Background flash, used when you "
|
Cmd_AddCommand ("bf", V_BonusFlash_f, "Background flash, used when you "
|
||||||
"pick up an item");
|
"pick up an item");
|
||||||
Cmd_AddCommand ("centerview", V_StartPitchDrift, "Centers the player's "
|
Cmd_AddCommand ("centerview", V_StartPitchDrift, "Centers the player's "
|
||||||
"view ahead after +lookup or +lookdown \n"
|
"view ahead after +lookup or +lookdown \n"
|
||||||
"Will not work while mlook is active or freelook is 1.");
|
"Will not work while mlook is active or freelook is 1.");
|
||||||
|
Cmd_AddCommand ("v_cshift", V_cshift_f, "This adjusts all of the colors "
|
||||||
|
"currently being displayed.\n"
|
||||||
|
"Used when you are underwater, hit, have the Ring of "
|
||||||
|
"Shadows, or Quad Damage. (v_cshift r g b intensity)");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue