Host_Error ("CL_EntityNum: %i is an invalid number",num);
while (cl.num_entities<=num)
{
- cl_entities[cl.num_entities].colormap = vid.colormap;
+ cl_entities[cl.num_entities].colormap = 0; //vid.colormap;
cl.num_entities++;
}
}
else
forcelink = true; // hack to make null model players work
if (num > 0 && num <= cl.maxclients)
- R_TranslatePlayerSkin (num - 1);
+ R_TranslatePlayerSkin(num - 1);
}
ent->frame = ((bits & U_FRAME) ? MSG_ReadByte() : (baseline->frame & 0xFF));
i = bits & U_COLORMAP ? MSG_ReadByte() : baseline->colormap;
ent->deltabaseline.colormap = i;
if (!i)
- ent->colormap = vid.colormap;
+ ent->colormap = 0; //vid.colormap;
else
{
if (i > cl.maxclients)
Host_Error ("i >= cl.maxclients");
- ent->colormap = vid.colormap; // cl.scores[i-1].translations;
+ ent->colormap = i; //vid.colormap; // cl.scores[i-1].translations;
}
skin = bits & U_SKIN ? MSG_ReadByte() : baseline->skin;
{
ent->skinnum = skin;
if (num > 0 && num <= cl.maxclients)
- R_TranslatePlayerSkin (num - 1);
+ R_TranslatePlayerSkin(num - 1);
}
ent->deltabaseline.skin = skin;
// copy it to the current state
ent->model = cl.model_precache[ent->baseline.modelindex];
ent->frame = ent->baseline.frame;
- ent->colormap = vid.colormap;
+ ent->colormap = 0; //vid.colormap;
ent->skinnum = ent->baseline.skin;
ent->effects = ent->baseline.effects;
ent->alpha = 1;
if (i >= cl.maxclients)
Host_Error ("CL_ParseServerMessage: svc_updatecolors > MAX_SCOREBOARD");
cl.scores[i].colors = MSG_ReadByte ();
- R_TranslatePlayerSkin (i);
+ R_TranslatePlayerSkin(i);
break;
case svc_particle:
pos[0] = MSG_ReadCoord ();
pos[1] = MSG_ReadCoord ();
pos[2] = MSG_ReadCoord ();
-// R_ParticleExplosion (pos, false);
+ R_ParticleExplosion (pos, false);
dl = CL_AllocDlight (0);
VectorCopy (pos, dl->origin);
dl->radius = 350;
pos[0] = MSG_ReadCoord ();
pos[1] = MSG_ReadCoord ();
pos[2] = MSG_ReadCoord ();
-// R_ParticleExplosion (pos, false);
+ R_ParticleExplosion (pos, false);
dl = CL_AllocDlight (0);
VectorCopy (pos, dl->origin);
dl->radius = 600;
pos[0] = MSG_ReadCoord ();
pos[1] = MSG_ReadCoord ();
pos[2] = MSG_ReadCoord ();
-// R_ParticleExplosion (pos, false);
+ R_ParticleExplosion (pos, false);
dl = CL_AllocDlight (0);
VectorCopy (pos, dl->origin);
dl->radius = 350;
pos[0] = MSG_ReadCoord ();
pos[1] = MSG_ReadCoord ();
pos[2] = MSG_ReadCoord ();
-// R_ParticleExplosion (pos, false);
+ R_ParticleExplosion (pos, false);
dl = CL_AllocDlight (0);
VectorCopy (pos, dl->origin);
dl->radius = 350;
pos[0] = MSG_ReadCoord ();
pos[1] = MSG_ReadCoord ();
pos[2] = MSG_ReadCoord ();
-// R_BlobExplosion (pos);
+ R_BlobExplosion (pos);
S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
dl = CL_AllocDlight (0);
cl_visedicts[cl_numvisedicts] = ent;
cl_numvisedicts++;
- ent->colormap = vid.colormap;
+// ent->colormap = vid.colormap;
+ ent->colormap = 0;
ent->scale = 1;
ent->alpha = 1;
ent->colormod[0] = ent->colormod[1] = ent->colormod[2] = 1;
// LordHavoc: speedup, and other improvements
if (team_message)
- sprintf(temptext, "say:%s%c", chat_buffer, (int) 10+((int)(realtime*con_cursorspeed)&1));
- else
sprintf(temptext, "say_team:%s%c", chat_buffer, (int) 10+((int)(realtime*con_cursorspeed)&1));
+ else
+ sprintf(temptext, "say:%s%c", chat_buffer, (int) 10+((int)(realtime*con_cursorspeed)&1));
while (strlen(temptext) >= con_linewidth)
{
Draw_String (8, v, temptext, con_linewidth);
byte conback_buffer[sizeof(qpic_t) + sizeof(glpic_t)];
qpic_t *conback = (qpic_t *)&conback_buffer;
-int gl_filter_min = GL_LINEAR_MIPMAP_NEAREST;
+int gl_filter_min = GL_LINEAR_MIPMAP_LINEAR; //NEAREST;
int gl_filter_max = GL_LINEAR;
cvar_t r_speeds2 = {"r_speeds2","0"};
cvar_t r_fullbright = {"r_fullbright","0"};
//cvar_t r_lightmap = {"r_lightmap","0"};
-//cvar_t r_shadows = {"r_shadows","0"};
+cvar_t r_shadows = {"r_shadows","0"};
cvar_t r_wateralpha = {"r_wateralpha","1"};
-//cvar_t r_dynamic = {"r_dynamic","1"};
+cvar_t r_dynamic = {"r_dynamic","1"};
cvar_t r_novis = {"r_novis","0"};
cvar_t r_waterripple = {"r_waterripple","0"};
cvar_t r_fullbrights = {"r_fullbrights", "1"};
glColor3f (1,1,1);
}
- /*
- if (r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
+ if (!fogenabled && r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
{
// flatten it to make a shadow
float *av = aliasvert + 2, l = lightspot[2] + 0.125;
glEnable (GL_TEXTURE_2D);
glColor3f (1,1,1);
}
- */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable (GL_BLEND);
glColor3f (1,1,1);
}
- /*
- if (r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
+ if (!fogenabled && r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
{
int i;
float *av = aliasvert + 2, l = lightspot[2] + 0.125;
glEnable (GL_TEXTURE_2D);
glColor3f (1,1,1);
}
- */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable (GL_BLEND);
// we can't dynamically colormap textures, so they are cached
// seperately for the players. Heads are just uncolored.
- if (currententity->colormap != vid.colormap/* && !gl_nocolors.value*/)
+ if (currententity->colormap != 0 /*vid.colormap*/ /* && !gl_nocolors.value*/)
{
i = currententity - cl_entities;
if (i >= 1 && i<=cl.maxclients /* && !strcmp (currententity->model->name, "progs/player.mdl") */)
- glBindTexture(GL_TEXTURE_2D, playertextures - 1 + i);
+ glBindTexture(GL_TEXTURE_2D, playertextures - 1 + i);
}
// if (gl_affinemodels.value)
// Cvar_RegisterVariable (&r_lightmap);
Cvar_RegisterVariable (&r_drawentities);
Cvar_RegisterVariable (&r_drawviewmodel);
-// Cvar_RegisterVariable (&r_shadows);
+ Cvar_RegisterVariable (&r_shadows);
Cvar_RegisterVariable (&r_wateralpha);
-// Cvar_RegisterVariable (&r_dynamic);
+ Cvar_RegisterVariable (&r_dynamic);
Cvar_RegisterVariable (&r_novis);
Cvar_RegisterVariable (&r_speeds);
Cvar_RegisterVariable (&r_waterripple); // LordHavoc: added waterripple
if (currentwallpoly < MAX_WALLPOLYS && currentwallvert < MAX_WALLVERTS && (currentwallvert + s->polys->numverts) <= MAX_WALLVERTS)
{
// check for lightmap modification
-// if (r_dynamic.value)
-// {
+ if (r_dynamic.value)
+ {
if (s->dlightframe == r_framecount || s->cached_dlight || lighthalf != s->cached_lighthalf) // dynamic this frame or previously, or lighthalf changed
R_UpdateLightmap(s, s->lightmaptexturenum);
else
R_UpdateLightmap(s, s->lightmaptexturenum);
break;
}
-// }
+ }
wallpoly[currentwallpoly].texnum = (unsigned short) t->gl_texturenum;
wallpoly[currentwallpoly].lighttexnum = (unsigned short) lightmap_textures + s->lightmaptexturenum;
wallpoly[currentwallpoly].glowtexnum = (unsigned short) t->gl_glowtexturenum;
light = false;
if (s->flags & SURF_DRAWFULLBRIGHT)
r = g = b = lighthalf ? 128 : 255;
- else if (s->dlightframe == r_dlightframecount/* && r_dynamicwater.value*/)
+ else if (s->dlightframe == r_dlightframecount && r_dynamic.value)
light = true;
else
r = g = b = lighthalf ? 64 : 128;
b = 255.0f * currententity->colormod[2];
}
}
- else if (s->dlightframe == r_dlightframecount/* && r_dynamicwater.value*/)
+ else if (s->dlightframe == r_dlightframecount && r_dynamic.value)
light = true;
else
{
else
{
// check for lightmap modification
-// if (r_dynamic.value)
-// {
+ if (r_dynamic.value)
+ {
if (s->dlightframe == r_framecount || s->cached_dlight || lighthalf != s->cached_lighthalf) // dynamic this frame or previously, or lighthalf changed
R_UpdateLightmap(s, s->lightmaptexturenum);
else
R_UpdateLightmap(s, s->lightmaptexturenum);
break;
}
-// }
+ }
if (currentwallpoly < MAX_WALLPOLYS && (currentwallvert + s->polys->numverts) <= MAX_WALLVERTS)
{
wallpoly[currentwallpoly].texnum = (unsigned short) t->gl_texturenum;
cvar_t scr_showturtle = {"showturtle","0"};
cvar_t scr_showpause = {"showpause","1"};
cvar_t scr_printspeed = {"scr_printspeed","8"};
-cvar_t gl_triplebuffer = {"gl_triplebuffer", "1", true };
cvar_t showfps = {"showfps", "0", true};
extern cvar_t crosshair;
extern viddef_t vid; // global video state
-vrect_t scr_vrect;
-
qboolean scr_disabled_for_loading;
qboolean scr_drawloading;
float scr_disabled_time;
r_refdef.fov_x = scr_fov.value;
r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.vrect.width, r_refdef.vrect.height);
-
- scr_vrect = r_refdef.vrect;
}
Cvar_RegisterVariable (&scr_showpause);
Cvar_RegisterVariable (&scr_centertime);
Cvar_RegisterVariable (&scr_printspeed);
- Cvar_RegisterVariable (&gl_triplebuffer);
Cvar_RegisterVariable (&showfps);
//
if (!r_cache_thrash)
return;
- Draw_Pic (scr_vrect.x+32, scr_vrect.y, scr_ram);
+ Draw_Pic (32, 0, scr_ram);
}
/*
if (count < 3)
return;
- Draw_Pic (scr_vrect.x, scr_vrect.y, scr_turtle);
+ Draw_Pic (0, 0, scr_turtle);
}
/*
if (cls.demoplayback)
return;
- Draw_Pic (scr_vrect.x+64, scr_vrect.y, scr_net);
+ Draw_Pic (64, 0, scr_net);
}
/*
if (scr_conlines < scr_con_current)
scr_con_current = scr_conlines;
}
-
- /*
- if (clearconsole++ < vid.numpages)
- {
- Sbar_Changed ();
- }
- else if (clearnotify++ < vid.numpages)
- {
- }
- else
- con_notifylines = 0;
- */
}
/*
if (!gl_arrays)
gl_vertexarrays.value = 0;
- vid.numpages = 2 + gl_triplebuffer.value;
-
scr_copytop = 0;
scr_copyeverything = 0;
else
{
if (crosshair.value)
- Draw_Character (scr_vrect.x + scr_vrect.width/2, scr_vrect.y + scr_vrect.height/2, '+');
+ Draw_Character (r_refdef.vrect.x + r_refdef.vrect.width/2, r_refdef.vrect.y + r_refdef.vrect.height/2, '+');
SCR_DrawRam ();
SCR_DrawNet ();
// LordHavoc: added dust, smoke, snow, bloodcloud, and many others
typedef enum {
- pt_static, pt_grav, pt_slowgrav, pt_fire, pt_explode, pt_explode2, pt_blob, pt_blob2, pt_dust, pt_smoke, pt_snow, pt_bulletpuff, pt_bloodcloud, pt_fadespark, pt_fadespark2, pt_fallfadespark, pt_fallfadespark2, pt_bubble
+ pt_static, pt_grav, pt_slowgrav, pt_fire, pt_explode, pt_explode2, pt_blob, pt_blob2, pt_dust, pt_smoke, pt_snow, pt_bulletpuff, pt_bloodcloud, pt_fadespark, pt_fadespark2, pt_fallfadespark, pt_fallfadespark2, pt_bubble, pt_fade
} ptype_t;
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
// LordHavoc: added for improved particle effects
float scale;
short texnum;
- short contents; // if non-zero, particles will die outside of this content type
float alpha; // 0-255
float time2; // used for various things (snow fluttering, for example)
vec3_t vel2; // used for snow fluttering (base velocity, wind for instance)
//extern cvar_t r_waterwarp;
extern cvar_t r_fullbright;
//extern cvar_t r_lightmap;
-//extern cvar_t r_shadows;
+extern cvar_t r_shadows;
extern cvar_t r_wateralpha;
-//extern cvar_t r_dynamic;
+extern cvar_t r_dynamic;
extern cvar_t r_novis;
extern cvar_t r_waterripple;
jmp_buf host_abortserver;
byte *host_basepal;
-byte *host_colormap;
+//byte *host_colormap;
cvar_t host_framerate = {"host_framerate","0"}; // set for slow motion
cvar_t host_speeds = {"host_speeds","0"}; // set for running times
host_basepal = (byte *)COM_LoadHunkFile ("gfx/palette.lmp", false);
if (!host_basepal)
Sys_Error ("Couldn't load gfx/palette.lmp");
- host_colormap = (byte *)COM_LoadHunkFile ("gfx/colormap.lmp", false);
- if (!host_colormap)
- Sys_Error ("Couldn't load gfx/colormap.lmp");
+// host_colormap = (byte *)COM_LoadHunkFile ("gfx/colormap.lmp", false);
+// if (!host_colormap)
+// Sys_Error ("Couldn't load gfx/colormap.lmp");
#ifndef _WIN32 // on non win32, mouse comes before video for security reasons
IN_Init ();
r_dlightframecount = r_framecount + 1; // because the count hasn't advanced yet for this frame
-// if (gl_flashblend.value || !r_dynamic.value)
-// return;
+ if (/*gl_flashblend.value ||*/ !r_dynamic.value)
+ return;
l = cl_dlights;
vec3_t dist;
float brightness, r, f;
- if (/*gl_flashblend.value || !r_dynamic.value || */(!dlightbits[0] && !dlightbits[1] && !dlightbits[2] && !dlightbits[3] && !dlightbits[4] && !dlightbits[5] && !dlightbits[6] && !dlightbits[7]))
+ if (/*gl_flashblend.value ||*/ !r_dynamic.value || (!dlightbits[0] && !dlightbits[1] && !dlightbits[2] && !dlightbits[3] && !dlightbits[4] && !dlightbits[5] && !dlightbits[6] && !dlightbits[7]))
return;
for (i=0 ; i<MAX_DLIGHTS ; i++)
vec3_t dist;
float brightness, r, f;
-// if (gl_flashblend.value || !r_dynamic.value)
-// return;
+ if (/*gl_flashblend.value ||*/ !r_dynamic.value)
+ return;
for (i=0 ; i<MAX_DLIGHTS ; i++)
{
p->next = active_particles;
active_particles = p;
- p->contents = 0;
p->texnum = flareparticletexture;
p->scale = 2;
p->alpha = 255;
p->next = active_particles;
active_particles = p;
- p->contents = 0;
p->texnum = particletexture;
p->scale = 2;
p->alpha = 255;
===============
*/
-/*
void R_ParticleExplosion (vec3_t org, int smoke)
{
int i, j;
particle_t *p;
if (!r_particles.value) return; // LordHavoc: particles are optional
- for (i=0 ; i<2048 ; i++)
+ for (i=0 ; i<1024 ; i++)
{
if (!free_particles)
return;
p->next = active_particles;
active_particles = p;
- p->contents = 0;
- p->texnum = flareparticletexture;
- p->scale = lhrandom(2,5);
+ p->texnum = smokeparticletexture[rand()&7];
+ p->scale = lhrandom(1,3);
p->alpha = rand()&255;
p->die = cl.time + 5;
p->color = ramp1[0];
- p->ramp = rand()&3;
+ p->ramp = lhrandom(0, 4);
// if (i & 1)
// p->type = pt_explode;
// else
for (j=0 ; j<3 ; j++)
{
p->org[j] = org[j] + ((rand()&15)-8);
- p->vel[j] = (rand()&511)-256;
+ p->vel[j] = lhrandom(-192, 192);
}
- p->vel[j] += 200;
+ p->vel[2] += 160;
}
if (smoke)
p->next = active_particles;
active_particles = p;
- p->contents = 0;
p->texnum = smokeparticletexture[rand()&7];
p->scale = 12;
p->alpha = 80;
}
}
}
-*/
/*
===============
===============
*/
-/*
void R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
{
int i, j;
p->next = active_particles;
active_particles = p;
- p->contents = 0;
- p->texnum = flareparticletexture;
- p->scale = 4;
+ p->texnum = smokeparticletexture[rand()&7];
+ p->scale = 1.5;
p->alpha = 255;
p->die = cl.time + 0.3;
p->color = colorStart + (colorMod % colorLength);
for (j=0 ; j<3 ; j++)
{
p->org[j] = org[j] + ((rand()&15)-8);
- p->vel[j] = (rand()%512)-256;
+ p->vel[j] = lhrandom(-128, 128);
}
}
}
-*/
/*
===============
===============
*/
-/*
void R_BlobExplosion (vec3_t org)
{
int i, j;
p->next = active_particles;
active_particles = p;
- p->contents = 0;
- p->texnum = flareparticletexture;
- p->scale = 4;
+ p->texnum = smokeparticletexture[rand()&7];
+ p->scale = 2;
p->alpha = 255;
p->die = cl.time + 1 + (rand()&8)*0.05;
for (j=0 ; j<3 ; j++)
{
p->org[j] = org[j] + ((rand()%32)-16);
- p->vel[j] = (rand()%512)-256;
+ p->vel[j] = lhrandom(-128, 128);
}
}
else
for (j=0 ; j<3 ; j++)
{
p->org[j] = org[j] + ((rand()%32)-16);
- p->vel[j] = (rand()%512)-256;
+ p->vel[j] = lhrandom(-128, 128);
}
}
+ p->vel[0] *= 0.25;
+ p->vel[1] *= 0.25;
}
}
-*/
/*
===============
*/
void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
{
- int i, j;
+ int j;
particle_t *p;
if (!r_particles.value) return; // LordHavoc: particles are optional
- for (i=0 ; i<count ; i++)
+ if (count == 1024)
+ {
+ R_ParticleExplosion(org, false);
+ return;
+ }
+ while (count)
{
if (!free_particles)
return;
free_particles = p->next;
p->next = active_particles;
active_particles = p;
-
- p->contents = 0;
- if (count == 1024)
- { // rocket explosion
- p->texnum = flareparticletexture;
- p->scale = 4;
- p->alpha = 255;
- p->die = cl.time + 5;
- p->color = ramp1[0];
- p->ramp = rand()&3;
- if (i & 1)
- {
- p->type = pt_explode;
- for (j=0 ; j<3 ; j++)
- {
- p->org[j] = org[j] + ((rand()%32)-16);
- p->vel[j] = (rand()%512)-256;
- }
- }
- else
- {
- p->type = pt_explode2;
- for (j=0 ; j<3 ; j++)
- {
- p->org[j] = org[j] + ((rand()%32)-16);
- p->vel[j] = (rand()%512)-256;
- }
- }
+ if (count & 3)
+ {
+ p->alpha = (count & 3) * 16 + (rand()&15);
+ count &= ~3;
}
else
{
- p->texnum = flareparticletexture;
- p->scale = 4;
- p->alpha = 255;
- p->die = cl.time + 0.1*(rand()%5);
- p->color = (color&~7) + (rand()&7);
- p->type = pt_static; //slowgrav;
- for (j=0 ; j<3 ; j++)
- {
- p->org[j] = org[j] + ((rand()&15)-8);
- p->vel[j] = dir[j]*15;// + (rand()%300)-150;
- }
+ p->alpha = 64;
+ count -= 4;
+ }
+
+ p->texnum = particletexture;
+ p->scale = 6;
+ p->die = cl.time + 1; //lhrandom(0.1, 0.5);
+ p->color = (color&~7) + (rand()&7);
+ p->type = pt_fade; //static; //slowgrav;
+ for (j=0 ; j<3 ; j++)
+ {
+ p->org[j] = org[j] + ((rand()&15)-8);
+ p->vel[j] = dir[j]*15;// + (rand()%300)-150;
}
}
}
free_particles = p->next;
p->next = active_particles;
active_particles = p;
- p->contents = 0;
if (type == 0) // sparks
{
p->texnum = smokeparticletexture[rand()&7];
}
else // blood
{
- p->texnum = bloodcloudparticletexture;
+ p->texnum = smokeparticletexture[rand()&7];
p->scale = 12;
p->alpha = 128;
p->color = (rand()&3)+68;
p->next = active_particles;
active_particles = p;
- p->contents = 0;
p->texnum = flareparticletexture;
p->scale = 2;
p->alpha = 255;
p->next = active_particles;
active_particles = p;
- p->contents = 0;
p->texnum = bloodcloudparticletexture;
p->scale = 12;
p->alpha = 96 + (rand()&63);
p->next = active_particles;
active_particles = p;
- p->contents = 0;
p->texnum = flareparticletexture;
p->scale = 6;
p->alpha = 255;
org[1] = diff[1] * (float) (rand()&1023) * (1.0 / 1024.0) + mins[1];
org[2] = z;
- p->contents = 0;
p->scale = 1.5;
p->alpha = 255;
p->die = t;
p->next = active_particles;
active_particles = p;
- p->contents = 0;
p->texnum = flareparticletexture;
p->scale = 10;
p->alpha = 128;
p->next = active_particles;
active_particles = p;
- p->contents = 0;
p->texnum = flareparticletexture;
p->scale = 4;
p->alpha = lhrandom(32,256);
p->next = active_particles;
active_particles = p;
- p->contents = 0;
p->vel[0] = p->vel[1] = p->vel[2] = 0;
p->die = cl.time + 2;
if (bubbles)
{
dec = 0.005f;
- p->contents = contents;
p->texnum = bubbleparticletexture;
p->scale = lhrandom(1,2);
p->alpha = 255;
*/
case 2: // blood
- dec = 0.03f;
- p->texnum = bloodcloudparticletexture;
- p->scale = lhrandom(8, 12);
+ dec = 0.025f;
+ p->texnum = smokeparticletexture[rand()&7];
+ p->scale = lhrandom(6, 8);
p->alpha = 255;
p->color = (rand()&3)+68;
p->type = pt_bloodcloud;
break;
case 4: // slight blood
- dec = 0.03f; // sparse trail
- p->texnum = bloodcloudparticletexture;
- p->scale = lhrandom(8,12);
- p->alpha = 255;
+ dec = 0.025f; // sparse trail
+ p->texnum = smokeparticletexture[rand()&7];
+ p->scale = lhrandom(6, 8);
+ p->alpha = 192;
p->color = (rand()&3)+68;
p->type = pt_fadespark2;
p->die = cl.time + 2;
case 6: // voor trail
dec = 0.05f; // sparse trail
- p->texnum = flareparticletexture;
- p->scale = lhrandom(4, 8);
+ p->texnum = smokeparticletexture[rand()&7];
+ p->scale = lhrandom(3, 5);
p->alpha = 255;
p->color = 9*16 + 8 + (rand()&3);
p->type = pt_fadespark2;
VectorCopy (vec3_origin, p->vel);
- p->contents = 0;
p->texnum = flareparticletexture;
p->scale = 8;
p->alpha = 192;
if (!p)
break;
- a = Mod_PointInLeaf(p->org, cl.worldmodel)->contents;
- if (a == CONTENTS_SOLID || (p->contents && p->contents != a))
- {
- p->die = -1;
- continue;
- }
VectorSubtract(p->org, r_refdef.vieworg, v);
if (DotProduct(v, v) >= 256.0f)
{
p->color = ramp2[(int)p->ramp];
// p->vel[2] -= grav1; // LordHavoc: apply full gravity to explosion sparks
for (i=0 ; i<3 ; i++)
- p->vel[i] -= p->vel[i]*frametime;
-// p->vel[2] -= grav;
+// p->vel[i] -= p->vel[i]*frametime;
+ p->vel[i] *= dvel;
+//// p->vel[2] -= grav;
break;
case pt_blob:
p->die = -1;
break;
case pt_bloodcloud:
- p->scale -= frametime * 24;
- p->alpha -= frametime * 128;
+ p->scale += frametime * 4;
+ p->alpha -= frametime * 64;
p->vel[2] -= grav;
if (p->alpha < 1 || p->scale < 1)
p->die = -1;
if (p->alpha < 1)
p->die = -1;
break;
+ case pt_fade:
+ p->alpha -= frametime * 512;
+ if (p->alpha < 1)
+ p->die = -1;
+ break;
case pt_bubble:
+ if (Mod_PointInLeaf(p->org, cl.worldmodel)->contents == CONTENTS_EMPTY)
+ p->die = -1;
p->vel[2] += grav1 * 2;
if (p->vel[2] >= 200)
p->vel[2] = lhrandom(130, 200);
struct efrag_s *efrag; // linked list of efrags
int frame;
float syncbase; // for client-side animations
- byte *colormap;
+// byte *colormap;
+ int colormap;
int effects; // light, particals, etc
int skinnum; // for Alias models
int visframe; // last frame this entity was
#include "quakedef.h"
-//int sb_updates; // if >= vid.numpages, no update needed
-
#define STAT_MINUS 10 // num frame for '-' stats digit
qpic_t *sb_nums[2][11];
qpic_t *sb_colon, *sb_slash;
if (scr_con_current == vid.height)
return; // console is full screen
- // LordHavoc: always redraw
- //if (sb_updates >= vid.numpages)
- // return;
-
scr_copyeverything = 1;
// sb_updates++;
fph = total ? (int) ((float) s->frags * 3600.0 / total) : 0;
if (fph < -999) fph = -999;
if (fph > 9999) fph = 9999;
-
+
// put it together
sprintf (num, "%c %4i:%4i %3i:%i%i %s", k == cl.viewentity - 1 ? 12 : ' ', (int) s->frags, fph, minutes, tens, units, s->name);
Draw_String(x - 8, y, num, 0);
*/
-// the status bar is only redrawn if something has changed, but if anything
-// does, the entire thing will be redrawn for the next vid.numpages frames.
-
#define SBAR_HEIGHT 24
extern int sb_lines; // scan lines to draw
typedef struct
{
- pixel_t *buffer; // invisible buffer
- pixel_t *colormap; // 256 * VID_GRADES size
- unsigned short *colormap16; // 256 * VID_GRADES size
- int fullbright; // index of first fullbright color
unsigned width;
unsigned height;
float aspect; // width / height -- < 0 is taller than wide
- int numpages;
int recalc_refdef; // if true, recalc vid-based stuff
- pixel_t *conbuffer;
unsigned conwidth;
unsigned conheight;
- int maxwarpwidth;
- int maxwarpheight;
- pixel_t *direct; // direct drawing to framebuffer, if not
- // NULL
} viddef_t;
extern viddef_t vid; // global video state
Cvar_RegisterVariable (&in_dgamouse);
Cvar_RegisterVariable (&m_filter);
- vid.maxwarpwidth = WARP_WIDTH;
- vid.maxwarpheight = WARP_HEIGHT;
- vid.colormap = host_colormap;
- vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
-
// interpret command-line params
// set vid parameters
vid.height = vid.conheight;
vid.aspect = ((float)vid.height / (float)vid.width) * (320.0 / 240.0);
- vid.numpages = 2;
InitSig(); // trap evil signals
vid.width = vid.conwidth;
vid.height = vid.conheight;
- vid.numpages = 2;
-
mainwindow = dibwindow;
SendMessage (mainwindow, WM_SETICON, (WPARAM)TRUE, (LPARAM)hIcon);
vid.width = vid.conwidth;
vid.height = vid.conheight;
- vid.numpages = 2;
-
// needed because we're not getting WM_MOVE messages fullscreen on NT
window_x = 0;
window_y = 0;
if (vid.conheight < 200)
vid.conheight = 200;
- vid.maxwarpwidth = WARP_WIDTH;
- vid.maxwarpheight = WARP_HEIGHT;
- vid.colormap = host_colormap;
- vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
-
DestroyWindow (hwnd_dialog);
VID_SetPalette (palette);
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
view->frame = cl.stats[STAT_WEAPONFRAME];
- view->colormap = vid.colormap;
+ view->colormap = 0; //vid.colormap;
// set up the refresh position
VectorAdd (r_refdef.viewangles, cl.punchangle, r_refdef.viewangles);
the entity origin, so any view position inside that will be valid
==================
*/
-extern vrect_t scr_vrect;
-
void V_RenderView (void)
{
if (con_forcedup)