mirror of
https://github.com/blendogames/thirtyflightsofloving.git
synced 2025-01-31 04:30:39 +00:00
Use cvar integer field instead of float value field where applicable in client and UI.
Fixed false alerts on 0-length unicasts in PF_Unicast().
This commit is contained in:
parent
57f72957d7
commit
ee9f79daff
18 changed files with 309 additions and 175 deletions
|
@ -876,13 +876,17 @@ void Con_DrawConsole (float frac, qboolean trans)
|
|||
// changeable download bar color
|
||||
int red, green, blue;
|
||||
|
||||
// CL_TextColor ((int)alt_text_color->value, &red, &green, &blue);
|
||||
CL_TextColor (alt_text_color->integer, &red, &green, &blue);
|
||||
|
||||
// Q3-style console bottom bar
|
||||
conLeft = picLeft = 0;
|
||||
conWidth = picWidth = SCREEN_WIDTH;
|
||||
picHeight = SCREEN_HEIGHT;
|
||||
SCR_AdjustFrom640 (&picLeft, NULL, &picWidth, &picHeight, ALIGN_CENTER);
|
||||
CL_TextColor ((int)alt_text_color->value, &red, &green, &blue);
|
||||
if ( (newconback_found && con_newconback->value) || con_oldconbar->value ) {
|
||||
|
||||
// if ( (newconback_found && con_newconback->value) || con_oldconbar->value ) {
|
||||
if ( (newconback_found && con_newconback->integer) || con_oldconbar->integer ) {
|
||||
barheight = 2;
|
||||
SCR_AdjustFrom640 (&conLeft, NULL, &conWidth, &barheight, ALIGN_STRETCH);
|
||||
}
|
||||
|
@ -900,14 +904,16 @@ void Con_DrawConsole (float frac, qboolean trans)
|
|||
|
||||
// Psychospaz's transparent console
|
||||
//alpha = (trans) ? ((frac/ (newconback_found?0.5:con_height->value) )*con_alpha->value) : 1;
|
||||
alpha = trans ? ((newconback_found && con_newconback->value) ? con_alpha->value : 2*frac*con_alpha->value) : 1;
|
||||
// alpha = trans ? ((newconback_found && con_newconback->value) ? con_alpha->value : 2*frac*con_alpha->value) : 1;
|
||||
alpha = trans ? ((newconback_found && con_newconback->integer) ? con_alpha->value : 2*frac*con_alpha->value) : 1;
|
||||
|
||||
// draw the background
|
||||
//i = newconback_found ? lines - barheight : lines*(1/con_height->value);
|
||||
//j = newconback_found ? 0 : (con_height->value-1)*i - barheight;
|
||||
y = lines - barheight;
|
||||
if (y < 1) y = 0;
|
||||
else if (newconback_found && con_newconback->value) // Q3-style console
|
||||
// else if (newconback_found && con_newconback->value) // Q3-style console
|
||||
else if (newconback_found && con_newconback->integer) // Q3-style console
|
||||
R_DrawStretchPic ((int)picLeft, 0, picWidth, lines-barheight, "/gfx/ui/newconback.pcx", alpha);
|
||||
else
|
||||
R_DrawStretchPic ((int)picLeft, (lines-(int)picHeight-(int)barheight), picWidth, (int)picHeight, "conback", alpha);
|
||||
|
@ -929,7 +935,8 @@ void Con_DrawConsole (float frac, qboolean trans)
|
|||
|
||||
Con_DrawString ((int)(conLeft+conWidth)-FONT_SIZE*(stringLen((const char *)&version))-3, y-(int)(1.25*FONT_SIZE), version, 255);
|
||||
|
||||
if ( (newconback_found && con_newconback->value) || con_oldconbar->value ) // Q3-style console bottom bar
|
||||
// if ( (newconback_found && con_newconback->value) || con_oldconbar->value ) // Q3-style console bottom bar
|
||||
if ( (newconback_found && con_newconback->integer) || con_oldconbar->integer ) // Q3-style console bottom bar
|
||||
R_DrawFill ((int)conLeft, y, conWidth, barheight, red, green, blue, 255);
|
||||
|
||||
// draw the text
|
||||
|
|
|
@ -148,7 +148,8 @@ CL_Explosion_Decal
|
|||
*/
|
||||
void CL_Explosion_Decal (vec3_t org, float size, int decalnum)
|
||||
{
|
||||
if (r_decals->value)
|
||||
// if (r_decals->value)
|
||||
if (r_decals->integer)
|
||||
{
|
||||
int i, j, offset=8; //size/2
|
||||
cparticle_t *p;
|
||||
|
@ -486,7 +487,8 @@ void CL_ParticleBloodThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alp
|
|||
|
||||
if (trace.fraction < 1.0) // delete and stain...
|
||||
{
|
||||
if (r_decals->value && (p->flags & PART_LEAVEMARK)
|
||||
// if (r_decals->value && (p->flags & PART_LEAVEMARK)
|
||||
if (r_decals->integer && (p->flags & PART_LEAVEMARK)
|
||||
&& !VectorCompare(trace.plane.normal, vec3_origin)
|
||||
&& !(CM_PointContents(p->oldorg,0) & MASK_WATER)) // no blood splatters underwater...
|
||||
{
|
||||
|
@ -662,13 +664,13 @@ CL_BloodHit
|
|||
*/
|
||||
void CL_BloodHit (vec3_t org, vec3_t dir)
|
||||
{
|
||||
if (cl_blood->value < 1) // disable blood option
|
||||
if (cl_blood->integer < 1) // disable blood option
|
||||
return;
|
||||
if (cl_blood->value == 2) // splat
|
||||
if (cl_blood->integer == 2) // splat
|
||||
CL_BloodSmack(org, dir);
|
||||
else if (cl_blood->value == 3) // bleed
|
||||
else if (cl_blood->integer == 3) // bleed
|
||||
CL_BloodBleed (org, dir, 6);
|
||||
else if (cl_blood->value == 4) // gore
|
||||
else if (cl_blood->integer == 4) // gore
|
||||
CL_BloodBleed (org, dir, 16);
|
||||
else // 1 = puff
|
||||
CL_BloodPuff(org, dir, 5);
|
||||
|
@ -687,7 +689,7 @@ void CL_GreenBloodHit (vec3_t org, vec3_t dir)
|
|||
int i;
|
||||
float d;
|
||||
|
||||
if (cl_blood->value < 1) // disable blood option
|
||||
if (cl_blood->integer < 1) // disable blood option
|
||||
return;
|
||||
|
||||
for (i=0;i<5;i++)
|
||||
|
@ -943,7 +945,7 @@ void CL_ParticleBulletDecal (vec3_t org, vec3_t dir, float size)
|
|||
vec3_t ang, angle, end, origin;
|
||||
trace_t tr;
|
||||
|
||||
if (!r_decals->value)
|
||||
if (!r_decals->integer)
|
||||
return;
|
||||
|
||||
VectorMA(org, DECAL_OFFSET, dir, origin);
|
||||
|
@ -987,7 +989,7 @@ void CL_ParticleRailDecal (vec3_t org, vec3_t dir, float size, qboolean isRed)
|
|||
vec3_t ang, angle, end, origin;
|
||||
trace_t tr;
|
||||
|
||||
if (!r_decals->value)
|
||||
if (!r_decals->integer)
|
||||
return;
|
||||
|
||||
VectorMA(org, -RAIL_DECAL_OFFSET, dir, origin);
|
||||
|
@ -1058,7 +1060,7 @@ void CL_ParticleBlasterDecal (vec3_t org, vec3_t dir, float size, int red, int g
|
|||
vec3_t ang, angle, end, origin;
|
||||
trace_t tr;
|
||||
|
||||
if (!r_decals->value)
|
||||
if (!r_decals->integer)
|
||||
return;
|
||||
|
||||
VectorMA(org, DECAL_OFFSET, dir, origin);
|
||||
|
@ -1129,7 +1131,7 @@ void CL_ParticlePlasmaBeamDecal (vec3_t org, vec3_t dir, float size)
|
|||
vec3_t ang, angle, end, origin;
|
||||
trace_t tr;
|
||||
|
||||
if (!r_decals->value)
|
||||
if (!r_decals->integer)
|
||||
return;
|
||||
|
||||
VectorMA(org, DECAL_OFFSET, dir, origin);
|
||||
|
@ -1566,11 +1568,10 @@ void CL_BlasterTracer (vec3_t origin, vec3_t angle, int red, int green, int blue
|
|||
void CL_HyperBlasterEffect (vec3_t start, vec3_t end, vec3_t angle, int red, int green, int blue,
|
||||
int reddelta, int greendelta, int bluedelta, float len, float size)
|
||||
{
|
||||
if (cl_particle_scale->value < 2)
|
||||
CL_BlasterTracer (end, angle, red, green, blue, len, size);
|
||||
if (cl_particle_scale->integer < 2)
|
||||
// CL_HyperBlasterTrail (start, end, red, green, blue, reddelta, greendelta, bluedelta);
|
||||
CL_HyperBlasterGlow (start, end, red, green, blue, reddelta, greendelta, bluedelta);
|
||||
//else //if (cl_particle_scale->value >= 2)
|
||||
CL_BlasterTracer (end, angle, red, green, blue, len, size);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1742,7 +1743,7 @@ void CL_DiminishingTrail (vec3_t start, vec3_t end, centity_t *old, int flags)
|
|||
{
|
||||
if (flags & EF_GIB)
|
||||
{
|
||||
if (cl_blood->value > 1)
|
||||
if (cl_blood->integer > 1)
|
||||
p = CL_SetupParticle (
|
||||
0, 0, random()*360,
|
||||
move[0] + crand()*orgscale, move[1] + crand()*orgscale, move[2] + crand()*orgscale,
|
||||
|
@ -2126,13 +2127,13 @@ void CL_RailTrail (vec3_t start, vec3_t end, qboolean isRed)
|
|||
int i;
|
||||
int beamred, beamgreen, beamblue;
|
||||
float len;//, dec;
|
||||
qboolean colored = (cl_railtype->value!=0);
|
||||
qboolean colored = (cl_railtype->integer != 0);
|
||||
|
||||
VectorSubtract (end, start, vec);
|
||||
VectorNormalize(vec);
|
||||
CL_ParticleRailDecal (end, vec, 7, isRed);
|
||||
|
||||
if (cl_railtype->value == 2)
|
||||
if (cl_railtype->integer == 2)
|
||||
{
|
||||
CL_DevRailTrail (start, end, isRed);
|
||||
return;
|
||||
|
@ -2147,7 +2148,7 @@ void CL_RailTrail (vec3_t start, vec3_t end, qboolean isRed)
|
|||
VectorSubtract (end, start, vec);
|
||||
}
|
||||
len = VectorNormalize (vec);
|
||||
if (cl_railtype->value == 0)
|
||||
if (cl_railtype->integer == 0)
|
||||
len = min (len, cl_rail_length->value); // cap length
|
||||
VectorCopy (vec, point);
|
||||
VectorScale (vec, RAILTRAILSPACE, vec);
|
||||
|
@ -2189,7 +2190,7 @@ void CL_RailTrail (vec3_t start, vec3_t end, qboolean isRed)
|
|||
PART_BEAM,
|
||||
NULL,0);
|
||||
}
|
||||
if (cl_railtype->value == 0)
|
||||
if (cl_railtype->integer == 0)
|
||||
CL_RailSprial (start, end, isRed);
|
||||
}
|
||||
|
||||
|
@ -3069,7 +3070,7 @@ void CL_Tracker_Shell (vec3_t origin)
|
|||
int i;
|
||||
cparticle_t *p;
|
||||
|
||||
for(i=0; i < (300/max(cl_particle_scale->value, 1.0f)); i++)
|
||||
for (i=0; i < (300/max(cl_particle_scale->value, 1.0f)); i++)
|
||||
{
|
||||
p = CL_SetupParticle (
|
||||
0, 0, 0,
|
||||
|
@ -3204,7 +3205,7 @@ void CL_Nukeblast (cl_sustain_t *self)
|
|||
ratio = 1.0 - (((float)self->endtime - (float)cl.time)/1000.0);
|
||||
size = ratio*ratio;
|
||||
|
||||
for(i=0; i<(700/max(cl_particle_scale->value, 1.0f)); i++)
|
||||
for (i=0; i<(700/max(cl_particle_scale->value, 1.0f)); i++)
|
||||
{
|
||||
index = rand()&3;
|
||||
p = CL_SetupParticle (
|
||||
|
|
|
@ -530,7 +530,8 @@ void CL_ParsePacketEntities (frame_t *oldframe, frame_t *newframe)
|
|||
|
||||
while (oldnum < newnum)
|
||||
{ // one or more entities from the old packet are unchanged
|
||||
if (cl_shownet->value == 3)
|
||||
// if (cl_shownet->value == 3)
|
||||
if (cl_shownet->integer == 3)
|
||||
Com_Printf (" unchanged: %i\n", oldnum);
|
||||
CL_DeltaEntity (newframe, oldnum, oldstate, 0);
|
||||
|
||||
|
@ -547,7 +548,8 @@ void CL_ParsePacketEntities (frame_t *oldframe, frame_t *newframe)
|
|||
|
||||
if (bits & U_REMOVE)
|
||||
{ // the entity present in oldframe is not in the current frame
|
||||
if (cl_shownet->value == 3)
|
||||
// if (cl_shownet->value == 3)
|
||||
if (cl_shownet->integer == 3)
|
||||
Com_Printf (" remove: %i\n", newnum);
|
||||
if (oldnum != newnum)
|
||||
Com_Printf ("U_REMOVE: oldnum != newnum\n");
|
||||
|
@ -566,7 +568,8 @@ void CL_ParsePacketEntities (frame_t *oldframe, frame_t *newframe)
|
|||
|
||||
if (oldnum == newnum)
|
||||
{ // delta from previous state
|
||||
if (cl_shownet->value == 3)
|
||||
// if (cl_shownet->value == 3)
|
||||
if (cl_shownet->integer == 3)
|
||||
Com_Printf (" delta: %i\n", newnum);
|
||||
CL_DeltaEntity (newframe, newnum, oldstate, bits);
|
||||
|
||||
|
@ -584,7 +587,8 @@ void CL_ParsePacketEntities (frame_t *oldframe, frame_t *newframe)
|
|||
|
||||
if (oldnum > newnum)
|
||||
{ // delta from baseline
|
||||
if (cl_shownet->value == 3)
|
||||
// if (cl_shownet->value == 3)
|
||||
if (cl_shownet->integer == 3)
|
||||
Com_Printf (" baseline: %i\n", newnum);
|
||||
CL_DeltaEntity (newframe, newnum, &cl_entities[newnum].baseline, bits);
|
||||
continue;
|
||||
|
@ -595,7 +599,8 @@ void CL_ParsePacketEntities (frame_t *oldframe, frame_t *newframe)
|
|||
// any remaining entities in the old frame are copied over
|
||||
while (oldnum != 99999)
|
||||
{ // one or more entities from the old packet are unchanged
|
||||
if (cl_shownet->value == 3)
|
||||
// if (cl_shownet->value == 3)
|
||||
if (cl_shownet->integer == 3)
|
||||
Com_Printf (" unchanged: %i\n", oldnum);
|
||||
CL_DeltaEntity (newframe, oldnum, oldstate, 0);
|
||||
|
||||
|
@ -950,7 +955,8 @@ void CL_ParseFrame (void)
|
|||
if (cls.serverProtocol != 26)
|
||||
cl.surpressCount = MSG_ReadByte (&net_message);
|
||||
|
||||
if (cl_shownet->value == 3)
|
||||
// if (cl_shownet->value == 3)
|
||||
if (cl_shownet->integer == 3)
|
||||
Com_Printf (" frame:%i delta:%i\n", cl.frame.serverframe,
|
||||
cl.frame.deltaframe);
|
||||
|
||||
|
@ -1346,7 +1352,8 @@ void CL_AddPacketEntities (frame_t *frame)
|
|||
ent.angles[1] = autorotate;
|
||||
ent.angles[2] = 0;
|
||||
// bobbing items by QuDos
|
||||
if (cl_item_bobbing->value) {
|
||||
// if (cl_item_bobbing->value) {
|
||||
if (cl_item_bobbing->integer) {
|
||||
float bob_scale = (0.005 + s1->number * 0.00001) * 0.5;
|
||||
float bob = cos((cl.time + 1000) * bob_scale) * 5;
|
||||
ent.oldorigin[2] += bob;
|
||||
|
@ -1407,7 +1414,8 @@ void CL_AddPacketEntities (frame_t *frame)
|
|||
{
|
||||
ci = &cl.clientinfo[s1->skinnum & 0xff];
|
||||
i = (s1->skinnum >> 8); // 0 is default weapon model
|
||||
if (!cl_vwep->value || i > MAX_CLIENTWEAPONMODELS - 1)
|
||||
// if (!cl_vwep->value || i > MAX_CLIENTWEAPONMODELS - 1)
|
||||
if (!cl_vwep->integer || i > MAX_CLIENTWEAPONMODELS - 1)
|
||||
i = 0;
|
||||
currentweaponmodel = cl_weaponmodels[i];
|
||||
}
|
||||
|
@ -1525,7 +1533,8 @@ void CL_AddPacketEntities (frame_t *frame)
|
|||
{ // custom weapon
|
||||
ci = &cl.clientinfo[s1->skinnum & 0xff];
|
||||
i = (s1->skinnum >> 8); // 0 is default weapon model
|
||||
if (!cl_vwep->value || i > MAX_CLIENTWEAPONMODELS - 1)
|
||||
// if (!cl_vwep->value || i > MAX_CLIENTWEAPONMODELS - 1)
|
||||
if (!cl_vwep->integer || i > MAX_CLIENTWEAPONMODELS - 1)
|
||||
i = 0;
|
||||
ent.model = ci->weaponmodel[i];
|
||||
if (!ent.model) {
|
||||
|
@ -1659,7 +1668,8 @@ void CL_AddPacketEntities (frame_t *frame)
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((effects & EF_GREENGIB) && cl_blood->value >= 1) // EF_BLASTER|EF_GREENGIB effect
|
||||
// if ((effects & EF_GREENGIB) && cl_blood->value >= 1) // EF_BLASTER|EF_GREENGIB effect
|
||||
if ((effects & EF_GREENGIB) && cl_blood->integer >= 1) // EF_BLASTER|EF_GREENGIB effect
|
||||
CL_DiminishingTrail (cent->lerp_origin, ent.origin, cent, effects);
|
||||
else
|
||||
CL_BlasterTrail (cent->lerp_origin, ent.origin, 255, 150, 50, 0, -90, -30);
|
||||
|
@ -1685,7 +1695,8 @@ void CL_AddPacketEntities (frame_t *frame)
|
|||
}
|
||||
else if (effects & EF_GIB)
|
||||
{
|
||||
if (cl_blood->value >= 1)
|
||||
// if (cl_blood->value >= 1)
|
||||
if (cl_blood->integer >= 1)
|
||||
CL_DiminishingTrail (cent->lerp_origin, ent.origin, cent, effects);
|
||||
}
|
||||
else if (effects & EF_GRENADE)
|
||||
|
@ -1771,7 +1782,8 @@ void CL_AddPacketEntities (frame_t *frame)
|
|||
// RAFAEL
|
||||
else if (effects & EF_GREENGIB)
|
||||
{
|
||||
if (cl_blood->value >= 1) // disable blood option
|
||||
// if (cl_blood->value >= 1) // disable blood option
|
||||
if (cl_blood->integer >= 1) // disable blood option
|
||||
CL_DiminishingTrail (cent->lerp_origin, ent.origin, cent, effects);
|
||||
}
|
||||
// RAFAEL
|
||||
|
@ -1816,7 +1828,8 @@ void CL_AddViewWeapon (player_state_t *ps, player_state_t *ops)
|
|||
if ( IsThirdPerson() )
|
||||
return;
|
||||
// allow the gun to be completely removed
|
||||
if (!cl_gun->value)
|
||||
// if (!cl_gun->value)
|
||||
if (!cl_gun->integer)
|
||||
return;
|
||||
|
||||
// don't draw gun if in wide angle view
|
||||
|
@ -1878,7 +1891,8 @@ void CL_AddViewWeapon (player_state_t *ps, player_state_t *ops)
|
|||
V_AddEntity (&gun);
|
||||
|
||||
//add shells for viewweaps (all of em!)
|
||||
if (cl_weapon_shells->value)
|
||||
// if (cl_weapon_shells->value)
|
||||
if (cl_weapon_shells->integer)
|
||||
{
|
||||
int oldeffects = gun.flags, pnum;
|
||||
entity_state_t *s1;
|
||||
|
@ -1963,7 +1977,8 @@ void CL_AddViewWeapon (player_state_t *ps, player_state_t *ops)
|
|||
V_AddEntity (&gun2);
|
||||
|
||||
//add shells for viewweaps (all of em!)
|
||||
if (cl_weapon_shells->value)
|
||||
// if (cl_weapon_shells->value)
|
||||
if (cl_weapon_shells->integer)
|
||||
{
|
||||
int oldeffects = gun2.flags, pnum;
|
||||
entity_state_t *s1;
|
||||
|
@ -2178,7 +2193,8 @@ void CL_CalcViewValues (void)
|
|||
lerp = cl.lerpfrac;
|
||||
|
||||
// calculate the origin
|
||||
if ( (cl_predict->value) && !(cl.frame.playerstate.pmove.pm_flags & PMF_NO_PREDICTION)
|
||||
// if ( (cl_predict->value) && !(cl.frame.playerstate.pmove.pm_flags & PMF_NO_PREDICTION)
|
||||
if ( (cl_predict->integer) && !(cl.frame.playerstate.pmove.pm_flags & PMF_NO_PREDICTION)
|
||||
&& !cl.attractloop ) // Jay Dolan fix- so long as we're not viewing a demo
|
||||
{ // use predicted values
|
||||
unsigned delta;
|
||||
|
@ -2260,14 +2276,16 @@ void CL_AddEntities (void)
|
|||
|
||||
if (cl.time > cl.frame.servertime)
|
||||
{
|
||||
if (cl_showclamp->value)
|
||||
// if (cl_showclamp->value)
|
||||
if (cl_showclamp->integer)
|
||||
Com_Printf ("high clamp %i\n", cl.time - cl.frame.servertime);
|
||||
cl.time = cl.frame.servertime;
|
||||
cl.lerpfrac = 1.0;
|
||||
}
|
||||
else if (cl.time < cl.frame.servertime - 100)
|
||||
{
|
||||
if (cl_showclamp->value)
|
||||
// if (cl_showclamp->value)
|
||||
if (cl_showclamp->integer)
|
||||
Com_Printf ("low clamp %i\n", cl.frame.servertime-100 - cl.time);
|
||||
cl.time = cl.frame.servertime - 100;
|
||||
cl.lerpfrac = 0;
|
||||
|
@ -2275,7 +2293,8 @@ void CL_AddEntities (void)
|
|||
else
|
||||
cl.lerpfrac = 1.0 - (cl.frame.servertime - cl.time) * 0.01;
|
||||
|
||||
if (cl_timedemo->value)
|
||||
// if (cl_timedemo->value)
|
||||
if (cl_timedemo->integer)
|
||||
cl.lerpfrac = 1.0;
|
||||
|
||||
// CL_AddPacketEntities (&cl.frame);
|
||||
|
|
|
@ -174,7 +174,8 @@ void CL_FootSteps (entity_state_t *ent, qboolean loud, qboolean recursed)
|
|||
volume = 1.0;
|
||||
break;
|
||||
default:
|
||||
if (cl_footstep_override->value && num_texsurfs && !recursed)
|
||||
// if (cl_footstep_override->value && num_texsurfs && !recursed)
|
||||
if (cl_footstep_override->integer && num_texsurfs && !recursed)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<num_texsurfs; i++)
|
||||
|
@ -235,13 +236,15 @@ void CL_EntityEvent (entity_state_t *ent)
|
|||
CL_TeleportParticles (ent->origin);
|
||||
break;
|
||||
case EV_FOOTSTEP:
|
||||
if (cl_footsteps->value)
|
||||
// if (cl_footsteps->value)
|
||||
if (cl_footsteps->integer)
|
||||
//Knightmare- Lazarus footsteps
|
||||
//S_StartSound (NULL, ent->number, CHAN_BODY, clMedia.sfx_footsteps[rand()&3], 1, ATTN_NORM, 0);
|
||||
CL_FootSteps (ent, false, false);
|
||||
break;
|
||||
case EV_LOUDSTEP:
|
||||
if (cl_footsteps->value)
|
||||
// if (cl_footsteps->value)
|
||||
if (cl_footsteps->integer)
|
||||
CL_FootSteps (ent, true, false);
|
||||
break;
|
||||
//end Knightmare
|
||||
|
|
|
@ -310,7 +310,8 @@ void CL_BaseMove (usercmd_t *cmd)
|
|||
//
|
||||
// adjust for speed key / running
|
||||
//
|
||||
if ( (in_speed.state & 1) ^ (int)(cl_run->value) )
|
||||
// if ( (in_speed.state & 1) ^ (int)(cl_run->value) )
|
||||
if ( (in_speed.state & 1) ^ (cl_run->integer) )
|
||||
{
|
||||
cmd->forwardmove *= 2;
|
||||
cmd->sidemove *= 2;
|
||||
|
@ -666,7 +667,8 @@ void CL_SendCmd_Async (void)
|
|||
|
||||
// let the server know what the last frame we
|
||||
// got was, so the next message can be delta compressed
|
||||
if (cl_nodelta->value || !cl.frame.valid || cls.demowaiting)
|
||||
// if (cl_nodelta->value || !cl.frame.valid || cls.demowaiting)
|
||||
if (cl_nodelta->integer || !cl.frame.valid || cls.demowaiting)
|
||||
MSG_WriteLong (&buf, -1); // no compression
|
||||
else
|
||||
MSG_WriteLong (&buf, cl.frame.serverframe);
|
||||
|
@ -770,7 +772,8 @@ void CL_SendCmd (void)
|
|||
|
||||
// let the server know what the last frame we
|
||||
// got was, so the next message can be delta compressed
|
||||
if (cl_nodelta->value || !cl.frame.valid || cls.demowaiting)
|
||||
// if (cl_nodelta->value || !cl.frame.valid || cls.demowaiting)
|
||||
if (cl_nodelta->integer || !cl.frame.valid || cls.demowaiting)
|
||||
MSG_WriteLong (&buf, -1); // no compression
|
||||
else
|
||||
MSG_WriteLong (&buf, cl.frame.serverframe);
|
||||
|
|
|
@ -422,7 +422,8 @@ void CL_AddViewLocs (void)
|
|||
vec3_t point;
|
||||
int i, index, num = 0;
|
||||
|
||||
if (!cl_drawlocs->value)
|
||||
// if (!cl_drawlocs->value)
|
||||
if (!cl_drawlocs->integer)
|
||||
return;
|
||||
|
||||
point[0] = cl.frame.playerstate.pmove.origin[0] * 0.125f;
|
||||
|
|
|
@ -473,7 +473,8 @@ void CL_Pause_f (void)
|
|||
return;
|
||||
}
|
||||
|
||||
Cvar_SetValue ("paused", !cl_paused->value);
|
||||
// Cvar_SetValue ("paused", !cl_paused->value);
|
||||
Cvar_SetValue ("paused", !cl_paused->integer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -538,7 +539,8 @@ void CL_SendConnectPacket (void)
|
|||
|
||||
// if in compatibility mode, lie to server about this
|
||||
// client's protocol, but exclude localhost for this.
|
||||
if (cl_servertrick->value && strcmp(cls.servername, "localhost"))
|
||||
// if (cl_servertrick->value && strcmp(cls.servername, "localhost"))
|
||||
if (cl_servertrick->integer && strcmp(cls.servername, "localhost"))
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, "connect %i %i %i \"%s\"\n",
|
||||
OLD_PROTOCOL_VERSION, port, cls.challenge, Cvar_Userinfo() );
|
||||
else
|
||||
|
@ -765,7 +767,8 @@ void CL_Disconnect (void)
|
|||
if (cls.state == ca_disconnected)
|
||||
return;
|
||||
|
||||
if (cl_timedemo && cl_timedemo->value)
|
||||
// if (cl_timedemo && cl_timedemo->value)
|
||||
if (cl_timedemo && cl_timedemo->integer)
|
||||
{
|
||||
int time;
|
||||
|
||||
|
@ -1011,14 +1014,16 @@ void CL_PingServers_f (void)
|
|||
|
||||
// if the server is using the old protocol,
|
||||
// lie to it about this client's protocol
|
||||
if (cl_servertrick->value)
|
||||
// if (cl_servertrick->value)
|
||||
if (cl_servertrick->integer)
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", OLD_PROTOCOL_VERSION));
|
||||
else
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", PROTOCOL_VERSION));
|
||||
}
|
||||
|
||||
noudp = Cvar_Get ("noudp", "0", CVAR_NOSET);
|
||||
if (!noudp->value)
|
||||
// if (!noudp->value)
|
||||
if (!noudp->integer)
|
||||
{
|
||||
global_udp_server_time = Sys_Milliseconds() ;
|
||||
adr.type = NA_BROADCAST;
|
||||
|
@ -1026,21 +1031,24 @@ void CL_PingServers_f (void)
|
|||
|
||||
// if the server is using the old protocol,
|
||||
// lie to it about this client's protocol
|
||||
if (cl_servertrick->value)
|
||||
// if (cl_servertrick->value)
|
||||
if (cl_servertrick->integer)
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", OLD_PROTOCOL_VERSION));
|
||||
else
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", PROTOCOL_VERSION));
|
||||
}
|
||||
|
||||
noipx = Cvar_Get ("noipx", "0", CVAR_NOSET);
|
||||
if (!noipx->value)
|
||||
// if (!noipx->value)
|
||||
if (!noipx->integer)
|
||||
{
|
||||
global_ipx_server_time = Sys_Milliseconds() ;
|
||||
adr.type = NA_BROADCAST_IPX;
|
||||
adr.port = BigShort(PORT_SERVER);
|
||||
// if the server is using the old protocol,
|
||||
// lie to it about this client's protocol
|
||||
if (cl_servertrick->value)
|
||||
// if (cl_servertrick->value)
|
||||
if (cl_servertrick->integer)
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", OLD_PROTOCOL_VERSION));
|
||||
else
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", PROTOCOL_VERSION));
|
||||
|
@ -1063,26 +1071,26 @@ void CL_PingServers_f (void)
|
|||
Com_Printf ("pinging broadcast...\n");
|
||||
|
||||
noudp = Cvar_Get ("noudp", "0", CVAR_NOSET);
|
||||
if (!noudp->value)
|
||||
if (!noudp->integer)
|
||||
{
|
||||
adr.type = NA_BROADCAST;
|
||||
adr.port = BigShort(PORT_SERVER);
|
||||
// if the server is using the old protocol,
|
||||
// lie to it about this client's protocol
|
||||
if (cl_servertrick->value)
|
||||
if (cl_servertrick->integer)
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", OLD_PROTOCOL_VERSION));
|
||||
else
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", PROTOCOL_VERSION));
|
||||
}
|
||||
|
||||
noipx = Cvar_Get ("noipx", "0", CVAR_NOSET);
|
||||
if (!noipx->value)
|
||||
if (!noipx->integer)
|
||||
{
|
||||
adr.type = NA_BROADCAST_IPX;
|
||||
adr.port = BigShort(PORT_SERVER);
|
||||
// if the server is using the old protocol,
|
||||
// lie to it about this client's protocol
|
||||
if (cl_servertrick->value)
|
||||
if (cl_servertrick->integer)
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", OLD_PROTOCOL_VERSION));
|
||||
else
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", PROTOCOL_VERSION));
|
||||
|
@ -1106,7 +1114,7 @@ void CL_PingServers_f (void)
|
|||
adr.port = BigShort(PORT_SERVER);
|
||||
// if the server is using the old protocol,
|
||||
// lie to it about this client's protocol
|
||||
if (cl_servertrick->value)
|
||||
if (cl_servertrick->integer)
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", OLD_PROTOCOL_VERSION));
|
||||
else
|
||||
Netchan_OutOfBandPrint (NS_CLIENT, adr, va("info %i", PROTOCOL_VERSION));
|
||||
|
@ -1366,7 +1374,8 @@ void CL_FixUpGender(void)
|
|||
char *p;
|
||||
char sk[80];
|
||||
|
||||
if (gender_auto->value)
|
||||
// if (gender_auto->value)
|
||||
if (gender_auto->integer)
|
||||
{
|
||||
if (gender->modified)
|
||||
{
|
||||
|
@ -1960,7 +1969,8 @@ void CL_Frame_Async (int msec)
|
|||
if (msec > 5000)
|
||||
cls.netchan.last_received = Sys_Milliseconds ();
|
||||
|
||||
if (!cl_timedemo->value)
|
||||
// if (!cl_timedemo->value)
|
||||
if (!cl_timedemo->integer)
|
||||
{ // Don't flood packets out while connecting
|
||||
if (cls.state == ca_connected && packetDelta < 100)
|
||||
packetFrame = false;
|
||||
|
@ -1979,7 +1989,8 @@ void CL_Frame_Async (int msec)
|
|||
|
||||
if (!packetFrame && !renderFrame && !cls.forcePacket && !userinfo_modified)
|
||||
{ // Pooy's CPU usage fix
|
||||
if (cl_sleep->value)
|
||||
// if (cl_sleep->value)
|
||||
if (cl_sleep->integer)
|
||||
{
|
||||
int temptime = min( (1000.0 / net_maxfps->value - packetDelta), (1000.0 / r_maxfps->value - renderDelta) );
|
||||
if (temptime > 1)
|
||||
|
@ -2047,10 +2058,12 @@ void CL_Frame_Async (int msec)
|
|||
// CL_PredictMovement ();
|
||||
|
||||
// update the screen
|
||||
if (host_speeds->value)
|
||||
// if (host_speeds->value)
|
||||
if (host_speeds->integer)
|
||||
time_before_ref = Sys_Milliseconds ();
|
||||
SCR_UpdateScreen ();
|
||||
if (host_speeds->value)
|
||||
// if (host_speeds->value)
|
||||
if (host_speeds->integer)
|
||||
time_after_ref = Sys_Milliseconds ();
|
||||
|
||||
// Update audio
|
||||
|
@ -2074,7 +2087,8 @@ void CL_Frame_Async (int msec)
|
|||
|
||||
cls.framecount++;
|
||||
|
||||
if (log_stats->value)
|
||||
// if (log_stats->value)
|
||||
if (log_stats->integer)
|
||||
{
|
||||
if (cls.state == ca_active)
|
||||
{
|
||||
|
@ -2138,11 +2152,13 @@ void CL_Frame (int msec)
|
|||
static int extratime;
|
||||
static int lasttimecalled;
|
||||
|
||||
if (dedicated->value)
|
||||
// if (dedicated->value)
|
||||
if (dedicated->integer)
|
||||
return;
|
||||
|
||||
#ifdef CLIENT_SPLIT_NETFRAME
|
||||
if (cl_async->value && !cl_timedemo->value)
|
||||
// if (cl_async->value && !cl_timedemo->value)
|
||||
if (cl_async->integer && !cl_timedemo->value)
|
||||
{
|
||||
CL_Frame_Async (msec);
|
||||
return;
|
||||
|
@ -2158,14 +2174,16 @@ void CL_Frame (int msec)
|
|||
if (cl_maxfps->value > 500)
|
||||
Cvar_SetValue("cl_maxfps", 500);
|
||||
|
||||
if (!cl_timedemo->value)
|
||||
// if (!cl_timedemo->value)
|
||||
if (!cl_timedemo->integer)
|
||||
{
|
||||
if (cls.state == ca_connected && extratime < 100)
|
||||
return; // don't flood packets out while connecting
|
||||
if (extratime < 1000.0 / cl_maxfps->value)
|
||||
{
|
||||
// Pooy's CPU usage fix
|
||||
if (cl_sleep->value)
|
||||
// if (cl_sleep->value)
|
||||
if (cl_sleep->integer)
|
||||
{
|
||||
int temptime = 1000 / cl_maxfps->value - extratime;
|
||||
if (temptime > 1)
|
||||
|
@ -2232,10 +2250,12 @@ void CL_Frame (int msec)
|
|||
CL_PrepRefresh ();
|
||||
|
||||
// update the screen
|
||||
if (host_speeds->value)
|
||||
// if (host_speeds->value)
|
||||
if (host_speeds->integer)
|
||||
time_before_ref = Sys_Milliseconds ();
|
||||
SCR_UpdateScreen ();
|
||||
if (host_speeds->value)
|
||||
// if (host_speeds->value)
|
||||
if (host_speeds->integer)
|
||||
time_after_ref = Sys_Milliseconds ();
|
||||
|
||||
// update audio
|
||||
|
@ -2256,7 +2276,8 @@ void CL_Frame (int msec)
|
|||
|
||||
cls.framecount++;
|
||||
|
||||
if ( log_stats->value )
|
||||
// if ( log_stats->value )
|
||||
if ( log_stats->integer )
|
||||
{
|
||||
if ( cls.state == ca_active )
|
||||
{
|
||||
|
@ -2288,7 +2309,8 @@ CL_Init
|
|||
*/
|
||||
void CL_Init (void)
|
||||
{
|
||||
if (dedicated->value)
|
||||
// if (dedicated->value)
|
||||
if (dedicated->integer)
|
||||
return; // nothing running on the client
|
||||
|
||||
// all archived variables will now be loaded
|
||||
|
|
|
@ -218,7 +218,8 @@ void CL_LoadClientinfo (clientinfo_t *ci, char *s)
|
|||
s = t+1;
|
||||
}
|
||||
|
||||
if (cl_noskins->value || *s == 0)
|
||||
// if (cl_noskins->value || *s == 0)
|
||||
if (cl_noskins->integer || *s == 0)
|
||||
{
|
||||
Com_sprintf (model_filename, sizeof(model_filename), "players/male/tris.md2");
|
||||
Com_sprintf (weapon_filename, sizeof(weapon_filename), "players/male/weapon.md2");
|
||||
|
@ -293,7 +294,8 @@ void CL_LoadClientinfo (clientinfo_t *ci, char *s)
|
|||
Com_sprintf (weapon_filename, sizeof(weapon_filename), "players/male/%s", cl_weaponmodels[i]);
|
||||
ci->weaponmodel[i] = R_RegisterModel(weapon_filename);
|
||||
}
|
||||
if (!cl_vwep->value)
|
||||
// if (!cl_vwep->value)
|
||||
if (!cl_vwep->integer)
|
||||
break; // only one when vwep is off
|
||||
}
|
||||
|
||||
|
@ -350,7 +352,8 @@ as track02-track11, and the Rogue CD as track12-track21.
|
|||
*/
|
||||
int CL_MissionPackCDTrack (int tracknum)
|
||||
{
|
||||
if (FS_ModType("rogue") || cl_rogue_music->value)
|
||||
// if (FS_ModType("rogue") || cl_rogue_music->value)
|
||||
if (FS_ModType("rogue") || cl_rogue_music->integer)
|
||||
{
|
||||
if (tracknum >= 2 && tracknum <= 11)
|
||||
return tracknum + 10;
|
||||
|
@ -358,7 +361,8 @@ int CL_MissionPackCDTrack (int tracknum)
|
|||
return tracknum;
|
||||
}
|
||||
// an out-of-order mix from Q2 and Rogue CDs
|
||||
else if (FS_ModType("xatrix") || cl_xatrix_music->value)
|
||||
// else if (FS_ModType("xatrix") || cl_xatrix_music->value)
|
||||
else if (FS_ModType("xatrix") || cl_xatrix_music->integer)
|
||||
{
|
||||
switch(tracknum)
|
||||
{
|
||||
|
@ -420,7 +424,8 @@ void CL_PlayBackgroundTrack (void)
|
|||
|
||||
// If an OGG file exists play it, otherwise fall back to CD audio
|
||||
Com_sprintf (name, sizeof(name), "music/track%02i.ogg", CL_MissionPackCDTrack(track));
|
||||
if ( (FS_LoadFile(name, NULL) != -1) && cl_ogg_music->value )
|
||||
// if ( (FS_LoadFile(name, NULL) != -1) && cl_ogg_music->value )
|
||||
if ( (FS_LoadFile(name, NULL) != -1) && cl_ogg_music->integer )
|
||||
S_StartBackgroundTrack(name, name);
|
||||
else
|
||||
CDAudio_Play(track, true);
|
||||
|
@ -667,7 +672,8 @@ void CL_ParsePrint (void)
|
|||
|
||||
void SHOWNET(char *s)
|
||||
{
|
||||
if (cl_shownet->value>=2)
|
||||
// if (cl_shownet->value >= 2)
|
||||
if (cl_shownet->integer >= 2)
|
||||
Com_Printf ("%3i:%s\n", net_message.readcount-1, s);
|
||||
}
|
||||
|
||||
|
@ -922,9 +928,11 @@ void CL_ParseServerMessage (void)
|
|||
//
|
||||
// if recording demos, copy the message out
|
||||
//
|
||||
if (cl_shownet->value == 1)
|
||||
// if (cl_shownet->value == 1)
|
||||
if (cl_shownet->integer == 1)
|
||||
Com_Printf ("%i ",net_message.cursize);
|
||||
else if (cl_shownet->value >= 2)
|
||||
// else if (cl_shownet->value >= 2)
|
||||
else if (cl_shownet->integer >= 2)
|
||||
Com_Printf ("------------------\n");
|
||||
|
||||
|
||||
|
@ -947,7 +955,8 @@ void CL_ParseServerMessage (void)
|
|||
break;
|
||||
}
|
||||
|
||||
if (cl_shownet->value>=2)
|
||||
// if (cl_shownet->value >= 2)
|
||||
if (cl_shownet->integer >= 2)
|
||||
{
|
||||
if (!svc_strings[cmd])
|
||||
Com_Printf ("%3i:BAD CMD %i\n", net_message.readcount-1,cmd);
|
||||
|
|
|
@ -606,7 +606,8 @@ void CL_AddParticles (void)
|
|||
alpha = p->alpha + time*p->alphavel;
|
||||
if (flags&PART_DECAL)
|
||||
{
|
||||
if (decals >= r_decals->value || alpha <= 0)
|
||||
// if (decals >= r_decals->value || alpha <= 0)
|
||||
if (decals >= r_decals->integer || alpha <= 0)
|
||||
{ // faded out
|
||||
p->alpha = 0;
|
||||
p->flags = 0;
|
||||
|
|
|
@ -33,7 +33,8 @@ void CL_CheckPredictionError (void)
|
|||
int i;
|
||||
int len;
|
||||
|
||||
if (!cl_predict->value || (cl.frame.playerstate.pmove.pm_flags & PMF_NO_PREDICTION))
|
||||
// if (!cl_predict->value || (cl.frame.playerstate.pmove.pm_flags & PMF_NO_PREDICTION))
|
||||
if (!cl_predict->integer || (cl.frame.playerstate.pmove.pm_flags & PMF_NO_PREDICTION))
|
||||
return;
|
||||
|
||||
// calculate the last usercmd_t we sent that the server has processed
|
||||
|
@ -51,7 +52,8 @@ void CL_CheckPredictionError (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (cl_showmiss->value && (delta[0] || delta[1] || delta[2]) )
|
||||
// if (cl_showmiss->value && (delta[0] || delta[1] || delta[2]) )
|
||||
if (cl_showmiss->integer && (delta[0] || delta[1] || delta[2]) )
|
||||
Com_Printf ("prediction miss on %i: %i\n", cl.frame.serverframe,
|
||||
delta[0] + delta[1] + delta[2]);
|
||||
|
||||
|
@ -451,10 +453,12 @@ void CL_PredictMovement (void)
|
|||
if (cls.state != ca_active)
|
||||
return;
|
||||
|
||||
if (cl_paused->value)
|
||||
// if (cl_paused->value)
|
||||
if (cl_paused->integer)
|
||||
return;
|
||||
|
||||
if (!cl_predict->value || (cl.frame.playerstate.pmove.pm_flags & PMF_NO_PREDICTION))
|
||||
// if (!cl_predict->value || (cl.frame.playerstate.pmove.pm_flags & PMF_NO_PREDICTION))
|
||||
if (!cl_predict->integer || (cl.frame.playerstate.pmove.pm_flags & PMF_NO_PREDICTION))
|
||||
{ // just set angles
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
|
@ -469,7 +473,8 @@ void CL_PredictMovement (void)
|
|||
// if we are too far out of date, just freeze
|
||||
if (current - ack >= CMD_BACKUP)
|
||||
{
|
||||
if (cl_showmiss->value)
|
||||
// if (cl_showmiss->value)
|
||||
if (cl_showmiss->integer)
|
||||
Com_Printf ("exceeded CMD_BACKUP\n");
|
||||
return;
|
||||
}
|
||||
|
@ -488,7 +493,8 @@ void CL_PredictMovement (void)
|
|||
frame = 0;
|
||||
|
||||
#ifdef CLIENT_SPLIT_NETFRAME
|
||||
if (cl_async->value)
|
||||
// if (cl_async->value)
|
||||
if (cl_async->integer)
|
||||
{
|
||||
// run frames
|
||||
while (++ack <= current) // Changed '<' to '<=' cause current is our pending cmd
|
||||
|
|
|
@ -713,7 +713,8 @@ static void SCR_ShowFPS (void)
|
|||
int i, time, total, fps, x, y, fragsSize;
|
||||
float scrLeft;
|
||||
|
||||
if ((cls.state != ca_active) || !(cl_drawfps->value))
|
||||
// if ((cls.state != ca_active) || !(cl_drawfps->value))
|
||||
if ((cls.state != ca_active) || !(cl_drawfps->integer))
|
||||
return;
|
||||
|
||||
SCR_InitHudScale ();
|
||||
|
@ -781,7 +782,8 @@ void CL_AddNetgraph (void)
|
|||
|
||||
// if using the debuggraph for something else, don't
|
||||
// add the net lines
|
||||
if (scr_debuggraph->value || scr_timegraph->value)
|
||||
// if (scr_debuggraph->value || scr_timegraph->value)
|
||||
if (scr_debuggraph->integer || scr_timegraph->integer)
|
||||
return;
|
||||
|
||||
for (i=0 ; i<cls.netchan.dropped ; i++)
|
||||
|
@ -843,7 +845,8 @@ void SCR_DrawDebugGraph (void)
|
|||
SCR_AdjustFrom640 (&scrLeft, NULL, &scrWidth, NULL, ALIGN_STRETCH);
|
||||
scrRight = scrLeft + scrWidth;
|
||||
|
||||
if (scr_netgraph_pos->value == 0) // bottom right
|
||||
// if (scr_netgraph_pos->value == 0) // bottom right
|
||||
if (scr_netgraph_pos->integer == 0) // bottom right
|
||||
{
|
||||
// x = scr_vrect.width - (w+2) - 1;
|
||||
x = scrRight - (w+2) - 1;
|
||||
|
@ -1054,12 +1057,15 @@ static void SCR_CalcVrect (void)
|
|||
int size;
|
||||
|
||||
// bound viewsize
|
||||
if (scr_viewsize->value < 40)
|
||||
// if (scr_viewsize->value < 40)
|
||||
if (scr_viewsize->integer < 40)
|
||||
Cvar_Set ("viewsize","40");
|
||||
if (scr_viewsize->value > 100)
|
||||
// if (scr_viewsize->value > 100)
|
||||
if (scr_viewsize->integer > 100)
|
||||
Cvar_Set ("viewsize","100");
|
||||
|
||||
size = scr_viewsize->value;
|
||||
// size = scr_viewsize->value;
|
||||
size = scr_viewsize->integer;
|
||||
|
||||
scr_vrect.width = viddef.width*size/100;
|
||||
scr_vrect.width &= ~1; // Knightmare- was ~7, fixes undersized viewport at 1366x768
|
||||
|
@ -1082,12 +1088,7 @@ Keybinding command
|
|||
void SCR_SizeUp_f (void)
|
||||
{
|
||||
// Cvar_SetValue ("viewsize", scr_viewsize->value+10);
|
||||
/*
|
||||
// now handle HUD alpha
|
||||
float hudalpha = Cvar_VariableValue("hud_alpha")+0.1;
|
||||
if (hudalpha > 1) hudalpha = 0.1;
|
||||
Cvar_SetValue ("hud_alpha", hudalpha);
|
||||
*/
|
||||
|
||||
// now handle HUD scale
|
||||
int hudscale = Cvar_VariableValue("hud_scale")+1;
|
||||
if (hudscale > HUDSCALE_NUM_SIZES-1) hudscale = HUDSCALE_NUM_SIZES-1;
|
||||
|
@ -1396,7 +1397,8 @@ void SCR_DrawCrosshair (void)
|
|||
{
|
||||
float /*scale,*/ scaledSize, alpha, pulsealpha;
|
||||
|
||||
if (!crosshair->value || scr_hidehud)
|
||||
// if (!crosshair->value || scr_hidehud)
|
||||
if (!crosshair->integer || scr_hidehud)
|
||||
return;
|
||||
|
||||
if (crosshair->modified)
|
||||
|
@ -1489,10 +1491,12 @@ void SCR_DrawPause (void)
|
|||
{
|
||||
int w, h;
|
||||
|
||||
if (!scr_showpause->value) // turn off for screenshots
|
||||
// if (!scr_showpause->value) // turn off for screenshots
|
||||
if (!scr_showpause->integer) // turn off for screenshots
|
||||
return;
|
||||
|
||||
if (!cl_paused->value)
|
||||
// if (!cl_paused->value)
|
||||
if (!cl_paused->integer)
|
||||
return;
|
||||
|
||||
// Knightmare- no need to draw when in menu
|
||||
|
@ -1540,7 +1544,8 @@ void SCR_DrawLoadingBar (float x, float y, float w, float h, int percent, float
|
|||
float iRatio, hiRatio;
|
||||
|
||||
// changeable download/map load bar color
|
||||
CL_TextColor ((int)alt_text_color->value, &red, &green, &blue);
|
||||
// CL_TextColor ((int)alt_text_color->value, &red, &green, &blue);
|
||||
CL_TextColor (alt_text_color->integer, &red, &green, &blue);
|
||||
iRatio = 1 - fabs(sizeRatio);
|
||||
hiRatio = iRatio * 0.5;
|
||||
|
||||
|
@ -1589,7 +1594,8 @@ void SCR_DrawLoading (void)
|
|||
char mapfile[64], picName[MAX_QPATH];
|
||||
char *loadMsg;
|
||||
qboolean isMap = false, haveMapPic = false, widescreen;
|
||||
qboolean simplePlaque = (scr_simple_loadscreen->value != 0);
|
||||
// qboolean simplePlaque = (scr_simple_loadscreen->value != 0);
|
||||
qboolean simplePlaque = (scr_simple_loadscreen->integer != 0);
|
||||
|
||||
if (!scr_draw_loading) {
|
||||
loadingPercent = 0;
|
||||
|
@ -1745,7 +1751,8 @@ SCR_RunLetterbox
|
|||
void SCR_RunLetterbox (void)
|
||||
{
|
||||
// decide on the height of the letterbox
|
||||
if (scr_letterbox->value && (cl.refdef.rdflags & RDF_LETTERBOX)) {
|
||||
// if (scr_letterbox->value && (cl.refdef.rdflags & RDF_LETTERBOX)) {
|
||||
if (scr_letterbox->integer && (cl.refdef.rdflags & RDF_LETTERBOX)) {
|
||||
scr_letterbox_lines = (1 - min(1, viddef.width*LETTERBOX_RATIO/viddef.height)) * 0.5;
|
||||
scr_letterbox_active = true;
|
||||
scr_hidehud = true;
|
||||
|
@ -1927,7 +1934,8 @@ void SCR_BeginLoadingPlaque (void)
|
|||
CDAudio_Stop ();
|
||||
//if (cls.disable_screen)
|
||||
// return;
|
||||
if (developer->value)
|
||||
// if (developer->value)
|
||||
if (developer->integer)
|
||||
return;
|
||||
|
||||
cls.consoleActive = false; // Knightmare added
|
||||
|
@ -2028,7 +2036,8 @@ void SCR_TileClear (void)
|
|||
|
||||
if (scr_con_current == 1.0)
|
||||
return; // full screen console
|
||||
if (scr_viewsize->value == 100)
|
||||
// if (scr_viewsize->value == 100)
|
||||
if (scr_viewsize->integer == 100)
|
||||
return; // full screen rendering
|
||||
if (cl.cinematictime > 0)
|
||||
return; // full screen cinematic
|
||||
|
@ -2214,7 +2223,8 @@ void SCR_DrawField (int x, int y, int color, int width, int value, qboolean flas
|
|||
l = strlen(num);
|
||||
if (l > width)
|
||||
{
|
||||
if (hud_squeezedigits->value) {
|
||||
// if (hud_squeezedigits->value) {
|
||||
if (hud_squeezedigits->integer) {
|
||||
l = min(l, width+2);
|
||||
fieldScale = (1.0 - ((1.0 - (float)width/(float)l) * 0.5)) * getScreenScale();
|
||||
}
|
||||
|
@ -2267,12 +2277,16 @@ void SCR_TouchPics (void)
|
|||
for (j=0 ; j<11 ; j++)
|
||||
R_DrawFindPic (sb_nums[i][j]);
|
||||
|
||||
if (crosshair->value)
|
||||
// if (crosshair->value)
|
||||
if (crosshair->integer)
|
||||
{
|
||||
if (crosshair->value > 100 || crosshair->value < 0) //Knightmare increased
|
||||
crosshair->value = 1;
|
||||
// if (crosshair->value > 100 || crosshair->value < 0) //Knightmare increased
|
||||
// crosshair->value = 1;
|
||||
if (crosshair->integer > 100 || crosshair->integer < 0) //Knightmare increased
|
||||
Cvar_SetInteger ("crosshair", 1);
|
||||
|
||||
Com_sprintf (crosshair_pic, sizeof(crosshair_pic), "ch%i", (int)(crosshair->value));
|
||||
// Com_sprintf (crosshair_pic, sizeof(crosshair_pic), "ch%i", (int)(crosshair->value));
|
||||
Com_sprintf (crosshair_pic, sizeof(crosshair_pic), "ch%i", crosshair->integer);
|
||||
R_DrawGetPicSize (&crosshair_width, &crosshair_height, crosshair_pic);
|
||||
if (!crosshair_width)
|
||||
crosshair_pic[0] = 0;
|
||||
|
@ -2739,7 +2753,8 @@ void SCR_UpdateScreen (void)
|
|||
// Re-init screen scale
|
||||
SCR_InitScreenScale ();
|
||||
|
||||
if ( cl_stereo->value )
|
||||
// if ( cl_stereo->value )
|
||||
if ( cl_stereo->integer )
|
||||
{
|
||||
numframes = 2;
|
||||
separation[0] = -cl_stereo_separation->value / 2;
|
||||
|
@ -2831,18 +2846,21 @@ void SCR_UpdateScreen (void)
|
|||
SCR_DrawNet ();
|
||||
SCR_CheckDrawCenterString ();
|
||||
|
||||
if (scr_timegraph->value)
|
||||
// if (scr_timegraph->value)
|
||||
if (scr_timegraph->integer)
|
||||
SCR_DebugGraph (cls.netFrameTime*300, 0);
|
||||
|
||||
if (scr_debuggraph->value || scr_timegraph->value || scr_netgraph->value)
|
||||
// if (scr_debuggraph->value || scr_timegraph->value || scr_netgraph->value)
|
||||
if (scr_debuggraph->integer || scr_timegraph->integer || scr_netgraph->integer)
|
||||
SCR_DrawDebugGraph ();
|
||||
|
||||
SCR_DrawPause ();
|
||||
|
||||
if (cl_demomessage->value)
|
||||
// if (cl_demomessage->value)
|
||||
if (cl_demomessage->integer)
|
||||
DrawDemoMessage();
|
||||
|
||||
//if ((cl_drawfps->value) && (cls.state == ca_active))
|
||||
// if ((cl_drawfps->integer) && (cls.state == ca_active))
|
||||
SCR_ShowFPS ();
|
||||
|
||||
UI_Draw ();
|
||||
|
|
|
@ -152,7 +152,7 @@ qboolean CL_StringSetParams (char modifier, int *red, int *green, int *blue, int
|
|||
case 'A': // alt text color
|
||||
case 'a':
|
||||
// CL_TextColor ((int)alt_text_color->value, red, green, blue);
|
||||
CL_TextColor ((int)alt_text_color->integer, red, green, blue);
|
||||
CL_TextColor (alt_text_color->integer, red, green, blue);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ void CL_DrawStringGeneric (int x, int y, const char *string, int alpha, int font
|
|||
{
|
||||
if (character & 128) {
|
||||
// CL_TextColor ((int)alt_text_color->value, &red, &green, &blue);
|
||||
CL_TextColor ((int)alt_text_color->integer, &red, &green, &blue);
|
||||
CL_TextColor (alt_text_color->integer, &red, &green, &blue);
|
||||
if ( (red != 255) || (green != 255) || (blue != 255) )
|
||||
character &= ~128;
|
||||
}
|
||||
|
|
|
@ -212,7 +212,8 @@ void CL_RegisterTEntSounds (void)
|
|||
clMedia.sfx_item_respawn = S_RegisterSound ("items/respawn1.wav");
|
||||
|
||||
// read footstep defintion file
|
||||
if (cl_footstep_override->value)
|
||||
// if (cl_footstep_override->value)
|
||||
if (cl_footstep_override->integer)
|
||||
ReadTextureSurfaceAssignments();
|
||||
// end Lazarus footstep sounds
|
||||
|
||||
|
@ -902,7 +903,8 @@ void CL_ParseTEnt (void)
|
|||
case TE_GRENADE_EXPLOSION:
|
||||
case TE_GRENADE_EXPLOSION_WATER:
|
||||
MSG_ReadPos (&net_message, pos);
|
||||
if (cl_old_explosions->value)
|
||||
// if (cl_old_explosions->value)
|
||||
if (cl_old_explosions->integer)
|
||||
{
|
||||
ex = CL_AllocExplosion ();
|
||||
VectorCopy (pos, ex->ent.origin);
|
||||
|
@ -935,7 +937,8 @@ void CL_ParseTEnt (void)
|
|||
// RAFAEL
|
||||
case TE_PLASMA_EXPLOSION:
|
||||
MSG_ReadPos (&net_message, pos);
|
||||
if (cl_old_explosions->value)
|
||||
// if (cl_old_explosions->value)
|
||||
if (cl_old_explosions->integer)
|
||||
{
|
||||
ex = CL_AllocExplosion ();
|
||||
VectorCopy (pos, ex->ent.origin);
|
||||
|
@ -958,7 +961,8 @@ void CL_ParseTEnt (void)
|
|||
}
|
||||
CL_Explosion_Sparks (pos, 16, 128);
|
||||
CL_Explosion_Decal (pos, 50, particle_burnmark);
|
||||
if (cl_plasma_explo_sound->value)
|
||||
// if (cl_plasma_explo_sound->value)
|
||||
if (cl_plasma_explo_sound->integer)
|
||||
S_StartSound (pos, 0, 0, clMedia.sfx_plasexp, 1, ATTN_NORM, 0);
|
||||
else
|
||||
S_StartSound (pos, 0, 0, clMedia.sfx_rockexp, 1, ATTN_NORM, 0);
|
||||
|
@ -966,7 +970,8 @@ void CL_ParseTEnt (void)
|
|||
|
||||
case TE_EXPLOSION1_BIG: // PMM
|
||||
MSG_ReadPos (&net_message, pos);
|
||||
if (cl_old_explosions->value)
|
||||
// if (cl_old_explosions->value)
|
||||
if (cl_old_explosions->integer)
|
||||
{
|
||||
ex = CL_AllocExplosion ();
|
||||
VectorCopy (pos, ex->ent.origin);
|
||||
|
@ -993,7 +998,8 @@ void CL_ParseTEnt (void)
|
|||
|
||||
case TE_EXPLOSION1_NP: // PMM
|
||||
MSG_ReadPos (&net_message, pos);
|
||||
if (cl_old_explosions->value)
|
||||
// if (cl_old_explosions->value)
|
||||
if (cl_old_explosions->integer)
|
||||
{
|
||||
ex = CL_AllocExplosion ();
|
||||
VectorCopy (pos, ex->ent.origin);
|
||||
|
@ -1023,7 +1029,8 @@ void CL_ParseTEnt (void)
|
|||
case TE_ROCKET_EXPLOSION:
|
||||
case TE_ROCKET_EXPLOSION_WATER:
|
||||
MSG_ReadPos (&net_message, pos);
|
||||
if (cl_old_explosions->value)
|
||||
// if (cl_old_explosions->value)
|
||||
if (cl_old_explosions->integer)
|
||||
{
|
||||
ex = CL_AllocExplosion ();
|
||||
VectorCopy (pos, ex->ent.origin);
|
||||
|
@ -1153,7 +1160,8 @@ void CL_ParseTEnt (void)
|
|||
case TE_FLECHETTE: // flechette hitting wall
|
||||
MSG_ReadPos (&net_message, pos);
|
||||
MSG_ReadDir (&net_message, dir);
|
||||
if (cl_old_explosions->value)
|
||||
// if (cl_old_explosions->value)
|
||||
if (cl_old_explosions->integer)
|
||||
{
|
||||
ex = CL_AllocExplosion ();
|
||||
VectorCopy (pos, ex->ent.origin);
|
||||
|
@ -1214,8 +1222,10 @@ void CL_ParseTEnt (void)
|
|||
// Psychospaz's enhanced particle code
|
||||
{
|
||||
int red, green, blue, numparts;
|
||||
float partsize = (cl_old_explosions->value) ? 2 : 4;
|
||||
numparts = (cl_old_explosions->value) ? 12 : (32 / max(cl_particle_scale->value/2, 1));
|
||||
// float partsize = (cl_old_explosions->value) ? 2 : 4;
|
||||
float partsize = (cl_old_explosions->integer) ? 2 : 4;
|
||||
// numparts = (cl_old_explosions->value) ? 12 : (32 / max(cl_particle_scale->value/2, 1));
|
||||
numparts = (cl_old_explosions->integer) ? 12 : (32 / max(cl_particle_scale->value/2, 1));
|
||||
if (type == TE_BLASTER2) {
|
||||
CL_BlasterParticles (pos, dir, numparts, partsize, 50, 235, 50, -10, 0, -10);
|
||||
red=50; green=235; blue=50; }
|
||||
|
@ -1418,9 +1428,11 @@ void CL_AddBeams (void)
|
|||
// chasecam grapple offset stuff
|
||||
if (hand)
|
||||
{
|
||||
if (hand->value == 2)
|
||||
// if (hand->value == 2)
|
||||
if (hand->integer == 2)
|
||||
handmult = 1;
|
||||
else if (hand->value == 1)
|
||||
// else if (hand->value == 1)
|
||||
else if (hand->integer == 1)
|
||||
handmult = -1;
|
||||
else
|
||||
handmult = 1;
|
||||
|
@ -1436,8 +1448,10 @@ void CL_AddBeams (void)
|
|||
if (!b->model || b->endtime < cl.time)
|
||||
continue;
|
||||
|
||||
firstperson = ((b->entity == cl.playernum+1) && !cg_thirdperson->value);
|
||||
chasecam = ((b->entity == cl.playernum+1) && cg_thirdperson->value);
|
||||
// firstperson = ((b->entity == cl.playernum+1) && !cg_thirdperson->value);
|
||||
// chasecam = ((b->entity == cl.playernum+1) && cg_thirdperson->value);
|
||||
firstperson = ((b->entity == cl.playernum+1) && !cg_thirdperson->integer);
|
||||
chasecam = ((b->entity == cl.playernum+1) && cg_thirdperson->integer);
|
||||
|
||||
// if coming from the player, update the start position
|
||||
if (firstperson) // entity 0 is the world
|
||||
|
@ -1614,9 +1628,11 @@ void CL_AddPlayerBeams (void)
|
|||
//PMM
|
||||
if (hand)
|
||||
{
|
||||
if (hand->value == 2)
|
||||
// if (hand->value == 2)
|
||||
if (hand->integer == 2)
|
||||
hand_multiplier = 0;
|
||||
else if (hand->value == 1)
|
||||
// else if (hand->value == 1)
|
||||
else if (hand->integer == 1)
|
||||
hand_multiplier = -1;
|
||||
else
|
||||
hand_multiplier = 1;
|
||||
|
@ -1643,8 +1659,10 @@ void CL_AddPlayerBeams (void)
|
|||
if (!b->model || b->endtime < cl.time)
|
||||
continue;
|
||||
|
||||
firstperson = ((b->entity == cl.playernum+1) && !cg_thirdperson->value);
|
||||
chasecam = ((b->entity == cl.playernum+1) && cg_thirdperson->value);
|
||||
// firstperson = ((b->entity == cl.playernum+1) && !cg_thirdperson->value);
|
||||
// chasecam = ((b->entity == cl.playernum+1) && cg_thirdperson->value);
|
||||
firstperson = ((b->entity == cl.playernum+1) && !cg_thirdperson->integer);
|
||||
chasecam = ((b->entity == cl.playernum+1) && cg_thirdperson->integer);
|
||||
|
||||
if(clMedia.mod_heatbeam && (b->model == clMedia.mod_heatbeam))
|
||||
{
|
||||
|
@ -1690,7 +1708,8 @@ void CL_AddPlayerBeams (void)
|
|||
VectorMA (b->start, (hand_multiplier * b->offset[0]), cl.v_right, org);
|
||||
VectorMA ( org, b->offset[1], cl.v_forward, org);
|
||||
VectorMA ( org, b->offset[2], cl.v_up, org);
|
||||
if ((hand) && (hand->value == 2)) {
|
||||
// if ((hand) && (hand->value == 2)) {
|
||||
if ((hand) && (hand->integer == 2)) {
|
||||
VectorMA (org, -1, cl.v_up, org);
|
||||
}
|
||||
// FIXME - take these out when final
|
||||
|
@ -1735,7 +1754,8 @@ void CL_AddPlayerBeams (void)
|
|||
VectorMA (dist, thirdp_pbeam_offset[1], f, dist);
|
||||
VectorMA (dist, thirdp_pbeam_offset[2], u, dist);
|
||||
}
|
||||
if ((hand) && (hand->value == 2) && !chasecam)
|
||||
// if ((hand) && (hand->value == 2) && !chasecam)
|
||||
if ((hand) && (hand->integer == 2) && !chasecam)
|
||||
VectorMA (org, -1, cl.v_up, org);
|
||||
}
|
||||
//PMM
|
||||
|
|
|
@ -257,7 +257,7 @@ if parsing of old protocol should be used.
|
|||
*/
|
||||
qboolean LegacyProtocol (void)
|
||||
{
|
||||
//if (dedicated->value) // Server always uses new protocol
|
||||
//if (dedicated->integer) // Server always uses new protocol
|
||||
// return false;
|
||||
if ( (Com_ServerState() && cls.serverProtocol <= OLD_PROTOCOL_VERSION)
|
||||
|| (cls.serverProtocol == OLD_PROTOCOL_VERSION) )
|
||||
|
@ -274,7 +274,7 @@ if parsing of R1Q2 protocol should be used.
|
|||
*/
|
||||
qboolean R1Q2Protocol (void)
|
||||
{
|
||||
//if (dedicated->value) // Server always uses new protocol
|
||||
//if (dedicated->integer) // Server always uses new protocol
|
||||
// return false;
|
||||
if ( cls.serverProtocol == R1Q2_PROTOCOL_VERSION )
|
||||
return true;
|
||||
|
|
|
@ -135,7 +135,8 @@ void V_AddEntity (entity_t *ent)
|
|||
for (i=0; i<3; i++)
|
||||
clientOrg[i] = ent->oldorigin[i] = ent->origin[i] = cl.predicted_origin[i];
|
||||
|
||||
if (hand->value == 1) //lefthanded
|
||||
// if (hand->value == 1) // lefthanded
|
||||
if (hand->integer == 1) // lefthanded
|
||||
ent->flags |= RF_MIRRORMODEL;
|
||||
|
||||
// if (cg_thirdperson->integer
|
||||
|
@ -675,7 +676,8 @@ void V_RenderView (float stereo_separation)
|
|||
if (!cl.refresh_prepped)
|
||||
return; // still loading
|
||||
|
||||
if (cl_timedemo->value)
|
||||
// if (cl_timedemo->value)
|
||||
if (cl_timedemo->integer)
|
||||
{
|
||||
if (!cl.timedemo_start)
|
||||
cl.timedemo_start = Sys_Milliseconds ();
|
||||
|
@ -684,7 +686,8 @@ void V_RenderView (float stereo_separation)
|
|||
|
||||
// an invalid frame will just use the exact previous refdef
|
||||
// we can't use the old frame if the video mode has changed, though...
|
||||
if ( cl.frame.valid && (cl.force_refdef || !cl_paused->value) )
|
||||
// if ( cl.frame.valid && (cl.force_refdef || !cl_paused->value) )
|
||||
if ( cl.frame.valid && (cl.force_refdef || !cl_paused->integer) )
|
||||
{
|
||||
cl.force_refdef = false;
|
||||
|
||||
|
@ -695,13 +698,17 @@ void V_RenderView (float stereo_separation)
|
|||
// v_forward, etc.
|
||||
CL_AddEntities ();
|
||||
|
||||
if (cl_testparticles->value)
|
||||
// if (cl_testparticles->value)
|
||||
if (cl_testparticles->integer)
|
||||
V_TestParticles ();
|
||||
if (cl_testentities->value)
|
||||
// if (cl_testentities->value)
|
||||
if (cl_testentities->integer)
|
||||
V_TestEntities ();
|
||||
if (cl_testlights->value)
|
||||
// if (cl_testlights->value)
|
||||
if (cl_testlights->integer)
|
||||
V_TestLights ();
|
||||
if (cl_testblend->value)
|
||||
// if (cl_testblend->value)
|
||||
if (cl_testblend->integer)
|
||||
{
|
||||
cl.refdef.blend[0] = 1;
|
||||
cl.refdef.blend[1] = 0.5;
|
||||
|
@ -731,7 +738,8 @@ void V_RenderView (float stereo_separation)
|
|||
cl.refdef.height = scr_vrect.height;
|
||||
|
||||
// adjust fov for wide aspect ratio
|
||||
if (cl_widescreen_fov->value)
|
||||
// if (cl_widescreen_fov->value)
|
||||
if (cl_widescreen_fov->integer)
|
||||
{
|
||||
// float standardRatio, currentRatio;
|
||||
// standardRatio = (float)SCREEN_WIDTH/(float)SCREEN_HEIGHT;
|
||||
|
@ -757,13 +765,17 @@ void V_RenderView (float stereo_separation)
|
|||
|
||||
cl.refdef.areabits = cl.frame.areabits;
|
||||
|
||||
if (!cl_add_entities->value)
|
||||
// if (!cl_add_entities->value)
|
||||
if (!cl_add_entities->integer)
|
||||
r_numentities = 0;
|
||||
if (!cl_add_particles->value)
|
||||
// if (!cl_add_particles->value)
|
||||
if (!cl_add_particles->integer)
|
||||
r_numparticles = 0;
|
||||
if (!cl_add_lights->value)
|
||||
// if (!cl_add_lights->value)
|
||||
if (!cl_add_lights->integer)
|
||||
r_numdlights = 0;
|
||||
if (!cl_add_blend->value)
|
||||
// if (!cl_add_blend->value)
|
||||
if (!cl_add_blend->integer)
|
||||
{
|
||||
VectorClear (cl.refdef.blend);
|
||||
}
|
||||
|
@ -788,9 +800,11 @@ void V_RenderView (float stereo_separation)
|
|||
}
|
||||
|
||||
R_RenderFrame (&cl.refdef);
|
||||
if (cl_stats->value)
|
||||
// if (cl_stats->value)
|
||||
if (cl_stats->integer)
|
||||
Com_Printf ("ent:%i lt:%i part:%i\n", r_numentities, r_numdlights, r_numparticles);
|
||||
if ( log_stats->value && ( log_stats_file != 0 ) )
|
||||
// if ( log_stats->value && ( log_stats_file != 0 ) )
|
||||
if ( log_stats->integer && ( log_stats_file != 0 ) )
|
||||
fprintf( log_stats_file, "%i,%i,%i,",r_numentities, r_numdlights, r_numparticles);
|
||||
}
|
||||
|
||||
|
@ -818,7 +832,8 @@ void V_Texture_f (void)
|
|||
trace_t tr;
|
||||
vec3_t forward, start, end;
|
||||
|
||||
if (!developer->value) // only works in developer mode
|
||||
// if (!developer->value) // only works in developer mode
|
||||
if (!developer->integer) // only works in developer mode
|
||||
return;
|
||||
|
||||
VectorCopy(cl.refdef.vieworg, start);
|
||||
|
@ -831,7 +846,7 @@ void V_Texture_f (void)
|
|||
if (!tr.surface)
|
||||
Com_Printf("Not a brush\n");
|
||||
else
|
||||
Com_Printf("Texture=%s, surface=0x%08x, value=%d\n",tr.surface->name,tr.surface->flags,tr.surface->value);
|
||||
Com_Printf("Texture=%s, surface=0x%08x, value=%d\n", tr.surface->name, tr.surface->flags, tr.surface->value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -846,7 +861,8 @@ void V_Surf_f (void)
|
|||
vec3_t forward, start, end;
|
||||
int s;
|
||||
|
||||
if (!developer->value) // only works in developer mode
|
||||
// if (!developer->value) // only works in developer mode
|
||||
if (!developer->integer) // only works in developer mode
|
||||
return;
|
||||
|
||||
// Disable this in multiplayer
|
||||
|
|
|
@ -47,7 +47,7 @@ void PF_Unicast (edict_t *ent, qboolean reliable)
|
|||
|
||||
// r1ch: trap bad writes from game dll
|
||||
// if (client->state <= cs_spawning)
|
||||
if (client->state < cs_spawned)
|
||||
if ( (client->state < cs_spawned) && (sv.multicast.cursize > 0) )
|
||||
{
|
||||
int msgType = (sv.multicast.cursize > 0) ? sv.multicast.data[0] : 0;
|
||||
msgType = min(max(msgType, 0), (num_svc_ops-1));
|
||||
|
|
|
@ -1196,7 +1196,8 @@ void UI_Think_MouseCursor (void)
|
|||
{
|
||||
if (cursor.menuitemtype == MENUITEM_ROTATE)
|
||||
{
|
||||
if (menu_rotate->value)
|
||||
// if (menu_rotate->value)
|
||||
if (menu_rotate->integer)
|
||||
Menu_SlideItem( m, -1 );
|
||||
else
|
||||
Menu_SlideItem( m, 1 );
|
||||
|
@ -1226,7 +1227,8 @@ void UI_Think_MouseCursor (void)
|
|||
{
|
||||
if (cursor.menuitemtype == MENUITEM_ROTATE)
|
||||
{
|
||||
if (menu_rotate->value)
|
||||
// if (menu_rotate->value)
|
||||
if (menu_rotate->integer)
|
||||
Menu_SlideItem( m, 1 );
|
||||
else
|
||||
Menu_SlideItem( m, -1 );
|
||||
|
|
|
@ -383,7 +383,8 @@ qboolean PlayerConfig_MenuInit (void)
|
|||
if (s_numplayermodels == 0)
|
||||
return false;
|
||||
|
||||
if ( hand->value < 0 || hand->value > 2 )
|
||||
// if ( hand->value < 0 || hand->value > 2 )
|
||||
if ( hand->integer < 0 || hand->integer > 2 )
|
||||
Cvar_SetValue( "hand", 0 );
|
||||
|
||||
// strncpy( currentdirectory, skin->string );
|
||||
|
@ -765,7 +766,8 @@ void PlayerConfig_MenuDraw (void)
|
|||
|
||||
yaw = anglemod(cl.time/10);
|
||||
|
||||
VectorSet (modelOrg, 150, (hand->value==1)?25:-25, 0); // was 80, 0, 0
|
||||
// VectorSet (modelOrg, 150, (hand->value==1)?25:-25, 0); // was 80, 0, 0
|
||||
VectorSet (modelOrg, 150, (hand->integer == 1)?25:-25, 0); // was 80, 0, 0
|
||||
|
||||
// Setup player model
|
||||
ent = &entity[0];
|
||||
|
@ -776,7 +778,8 @@ void PlayerConfig_MenuDraw (void)
|
|||
ent->skin = playerskin;
|
||||
|
||||
ent->flags = RF_FULLBRIGHT|RF_NOSHADOW|RF_DEPTHHACK;
|
||||
if (hand->value == 1)
|
||||
// if (hand->value == 1)
|
||||
if (hand->integer == 1)
|
||||
ent->flags |= RF_MIRRORMODEL;
|
||||
|
||||
ent->origin[0] = modelOrg[0];
|
||||
|
@ -791,7 +794,8 @@ void PlayerConfig_MenuDraw (void)
|
|||
//if ( ++yaw > 360 )
|
||||
// yaw -= 360;
|
||||
|
||||
if (hand->value == 1)
|
||||
// if (hand->value == 1)
|
||||
if (hand->integer == 1)
|
||||
ent->angles[1] = 360 - ent->angles[1];
|
||||
|
||||
refdef.num_entities++;
|
||||
|
@ -809,7 +813,8 @@ void PlayerConfig_MenuDraw (void)
|
|||
ent->skinnum = 0;
|
||||
|
||||
ent->flags = RF_FULLBRIGHT|RF_NOSHADOW|RF_DEPTHHACK;
|
||||
if (hand->value == 1)
|
||||
// if (hand->value == 1)
|
||||
if (hand->integer == 1)
|
||||
ent->flags |= RF_MIRRORMODEL;
|
||||
|
||||
ent->origin[0] = modelOrg[0];
|
||||
|
@ -822,7 +827,8 @@ void PlayerConfig_MenuDraw (void)
|
|||
ent->backlerp = 0.0;
|
||||
ent->angles[1] = yaw;
|
||||
|
||||
if (hand->value == 1)
|
||||
// if (hand->value == 1)
|
||||
if (hand->integer == 1)
|
||||
ent->angles[1] = 360 - ent->angles[1];
|
||||
|
||||
refdef.num_entities++;
|
||||
|
|
Loading…
Reference in a new issue