Tweak rocket trails. Uglier, but don't bog down rocket snipers. Also a couple tiny optimizations and cleanups.
This commit is contained in:
parent
882adf295a
commit
28fe1dc004
|
@ -62,7 +62,7 @@ R_InitBubble ()
|
|||
bub_cos = bubble_costable;
|
||||
|
||||
for (i = 32; i >= 0; i--) {
|
||||
a = i / 32.0 * M_PI * 2;
|
||||
a = i * (M_PI / 16.0);
|
||||
*bub_sin++ = sin (a);
|
||||
*bub_cos++ = cos (a);
|
||||
}
|
||||
|
|
|
@ -101,9 +101,9 @@ particle_new_random (ptype_t type, int texnum, vec3_t org, int org_fuzz,
|
|||
|
||||
for (j = 0; j < 3; j++) {
|
||||
if (org_fuzz)
|
||||
porg[j] = qfrandom (2.0 * org_fuzz) - org_fuzz + org[j];
|
||||
porg[j] = qfrandom (org_fuzz * 2) - org_fuzz + org[j];
|
||||
if (vel_fuzz)
|
||||
pvel[j] = qfrandom (2.0 * vel_fuzz) - vel_fuzz;
|
||||
pvel[j] = qfrandom (vel_fuzz * 2) - vel_fuzz;
|
||||
}
|
||||
return particle_new (type, texnum, porg, scale, pvel, die, color, alpha);
|
||||
}
|
||||
|
@ -440,7 +440,7 @@ R_RocketTrail (entity_t *ent)
|
|||
|
||||
while (len > 0) {
|
||||
pscalenext = 1.5 + qfrandom (1.5);
|
||||
dist = (pscale + pscalenext) * 1.3;
|
||||
dist = (pscale + pscalenext) * 3.0;
|
||||
|
||||
VectorScale (vec, min(dist, len), subtract);
|
||||
VectorAdd (ent->old_origin, subtract, ent->old_origin);
|
||||
|
|
|
@ -111,7 +111,6 @@ vec3_t shadecolor; // Ender (Extend) Colormod
|
|||
float modelalpha; // Ender (Extend) Alpha
|
||||
|
||||
void R_MarkLeaves (void);
|
||||
|
||||
//qboolean R_CullBlocked (vec3_t mins, vec3_t maxs, vec3_t org);
|
||||
|
||||
|
||||
|
@ -161,8 +160,7 @@ R_GetSpriteFrame (entity_t *currententity)
|
|||
time = r_realtime + currententity->syncbase;
|
||||
|
||||
// when loading in Mod_LoadSpriteGroup, we guaranteed all interval
|
||||
// values
|
||||
// are positive, so we don't have to worry about division by 0
|
||||
// values are positive, so we don't have to worry about division by 0
|
||||
targettime = time - ((int) (time / fullinterval)) * fullinterval;
|
||||
|
||||
for (i = 0; i < (numframes - 1); i++) {
|
||||
|
@ -250,8 +248,8 @@ vec3_t shadevector;
|
|||
static void
|
||||
GL_DrawAliasFrame (vert_order_t *vo, qboolean fb)
|
||||
{
|
||||
float color[4];
|
||||
float l;
|
||||
float color[4];
|
||||
int count;
|
||||
int *order;
|
||||
blended_vert_t *verts;
|
||||
|
@ -606,9 +604,9 @@ R_DrawAliasModel (entity_t *e, qboolean cull)
|
|||
shadedots = r_avertexnormal_dots[(int) (e->angles[1] *
|
||||
(SHADEDOT_QUANT / 360.0)) &
|
||||
(SHADEDOT_QUANT - 1)];
|
||||
shadelight /= 200.0;
|
||||
shadelight *= 0.005;
|
||||
|
||||
an = e->angles[1] / 180 * M_PI;
|
||||
an = e->angles[1] * (M_PI / 180);
|
||||
shadevector[0] = cos (-an);
|
||||
shadevector[1] = sin (-an);
|
||||
shadevector[2] = 1;
|
||||
|
|
|
@ -91,7 +91,7 @@ glRect_t lightmap_rectchange[MAX_LIGHTMAPS];
|
|||
msurface_t *waterchain = NULL;
|
||||
msurface_t *sky_chain;
|
||||
|
||||
extern vec3_t shadecolor; // Ender (Extend) Colormod
|
||||
//extern vec3_t shadecolor; // Ender (Extend) Colormod
|
||||
|
||||
|
||||
// LordHavoc: place for gl_rsurf setup code
|
||||
|
|
|
@ -45,19 +45,18 @@
|
|||
# include "winquake.h"
|
||||
#endif
|
||||
|
||||
#include "compat.h"
|
||||
#include "QF/console.h"
|
||||
#include "QF/cvar.h"
|
||||
#include "QF/input.h"
|
||||
#include "QF/qargs.h"
|
||||
#include "QF/sys.h"
|
||||
#include "QF/vfs.h"
|
||||
#include "QF/vid.h"
|
||||
#include "QF/sys.h"
|
||||
|
||||
#include "QF/GL/defines.h"
|
||||
#include "QF/GL/extensions.h"
|
||||
#include "QF/GL/funcs.h"
|
||||
#include "QF/GL/defines.h"
|
||||
|
||||
#include "compat.h"
|
||||
#include "sbar.h"
|
||||
|
||||
#define WARP_WIDTH 320
|
||||
|
@ -68,15 +67,11 @@ unsigned char d_15to8table[65536];
|
|||
|
||||
cvar_t *vid_mode;
|
||||
cvar_t *gl_multitexture;
|
||||
extern byte gammatable[256];
|
||||
extern qboolean GLF_Init ();
|
||||
|
||||
QF_glActiveTextureARB qglActiveTexture = NULL;
|
||||
QF_glMultiTexCoord2fARB qglMultiTexCoord2f = NULL;
|
||||
int gl_filter_min = GL_LINEAR_MIPMAP_NEAREST, gl_filter_max = GL_LINEAR;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
int texture_extension_number = 1;
|
||||
float gldepthmin, gldepthmax;
|
||||
|
||||
|
@ -94,13 +89,17 @@ qboolean is8bit = false;
|
|||
|
||||
cvar_t *vid_use8bit;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
extern byte gammatable[256];
|
||||
extern qboolean GLF_Init ();
|
||||
|
||||
|
||||
void
|
||||
GL_Common_Init_Cvars (void)
|
||||
{
|
||||
vid_use8bit = Cvar_Get ("vid_use8bit", "0", CVAR_ROM, NULL, "Use 8-bit shared palettes.");
|
||||
gl_multitexture = Cvar_Get ("gl_multitexture", "0", CVAR_ARCHIVE, NULL, "Use multitexture when available");
|
||||
vid_use8bit = Cvar_Get ("vid_use8bit", "0", CVAR_ROM, NULL, "Use 8-bit "
|
||||
"shared palettes.");
|
||||
gl_multitexture = Cvar_Get ("gl_multitexture", "0", CVAR_ARCHIVE, NULL,
|
||||
"Use multitexture when available");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -124,7 +123,8 @@ CheckMultiTextureExtensions (void)
|
|||
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS_ARB, &max_texture_units);
|
||||
if (max_texture_units >= 2) {
|
||||
Con_Printf ("enabled, %d TMUs.\n", max_texture_units);
|
||||
qglMultiTexCoord2f = QFGL_ExtensionAddress ("glMultiTexCoord2fARB");
|
||||
qglMultiTexCoord2f = QFGL_ExtensionAddress
|
||||
("glMultiTexCoord2fARB");
|
||||
qglActiveTexture = QFGL_ExtensionAddress ("glActiveTextureARB");
|
||||
gl_mtex_enum = GL_TEXTURE0_ARB;
|
||||
gl_mtex_capable = true;
|
||||
|
@ -140,20 +140,16 @@ void
|
|||
VID_SetPalette (unsigned char *palette)
|
||||
{
|
||||
byte *pal;
|
||||
unsigned int r, g, b;
|
||||
unsigned int v;
|
||||
int r1, g1, b1;
|
||||
int k;
|
||||
unsigned short i;
|
||||
unsigned int *table;
|
||||
VFile *f;
|
||||
char s[255];
|
||||
float dist, bestdist;
|
||||
int r1, g1, b1, k;
|
||||
unsigned int r, g, b, v;
|
||||
unsigned short i;
|
||||
unsigned int *table;
|
||||
static qboolean palflag = false;
|
||||
VFile *f;
|
||||
|
||||
//
|
||||
// 8 8 8 encoding
|
||||
//
|
||||
// 8 8 8 encoding
|
||||
// Con_Printf("Converting 8to24\n");
|
||||
|
||||
pal = palette;
|
||||
|
@ -265,9 +261,6 @@ GL_Init_Common (void)
|
|||
CheckMultiTextureExtensions ();
|
||||
}
|
||||
|
||||
/*
|
||||
GL_BeginRendering
|
||||
*/
|
||||
void
|
||||
GL_BeginRendering (int *x, int *y, int *width, int *height)
|
||||
{
|
||||
|
@ -282,7 +275,6 @@ VID_Is8bit (void)
|
|||
return is8bit;
|
||||
}
|
||||
|
||||
|
||||
#ifdef GL_SHARED_TEXTURE_PALETTE_EXT
|
||||
void
|
||||
Tdfx_Init8bitPalette (void)
|
||||
|
@ -300,7 +292,8 @@ Tdfx_Init8bitPalette (void)
|
|||
GLubyte table[256][4];
|
||||
QF_gl3DfxSetPaletteEXT qgl3DfxSetPaletteEXT = NULL;
|
||||
|
||||
if (!(qgl3DfxSetPaletteEXT = QFGL_ExtensionAddress ("gl3DfxSetPaletteEXT"))) {
|
||||
if (!(qgl3DfxSetPaletteEXT = QFGL_ExtensionAddress
|
||||
("gl3DfxSetPaletteEXT"))) {
|
||||
Con_Printf ("3DFX_set_global_palette not found.\n");
|
||||
return;
|
||||
}
|
||||
|
@ -324,14 +317,14 @@ Tdfx_Init8bitPalette (void)
|
|||
}
|
||||
|
||||
/*
|
||||
* The GL_EXT_shared_texture_palette seems like an idea which is
|
||||
* /almost/ a good idea, but seems to be severely broken with many
|
||||
* drivers, as such it is disabled.
|
||||
*
|
||||
* It should be noted, that a palette object extension as suggested by
|
||||
* the GL_EXT_shared_texture_palette spec might be a very good idea in
|
||||
* general.
|
||||
*/
|
||||
The GL_EXT_shared_texture_palette seems like an idea which is
|
||||
/almost/ a good idea, but seems to be severely broken with many
|
||||
drivers, as such it is disabled.
|
||||
|
||||
It should be noted, that a palette object extension as suggested by
|
||||
the GL_EXT_shared_texture_palette spec might be a very good idea in
|
||||
general.
|
||||
*/
|
||||
void
|
||||
Shared_Init8bitPalette (void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue