fix scrag/hknight trails - they're moving about 9 times too fast.
fix particle trail spam. oops. fix ttf fonts not using fallback quake glyphs. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5208 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0d82557c28
commit
7da299ee88
3 changed files with 28 additions and 14 deletions
|
@ -983,7 +983,7 @@ static int PClassic_RunParticleEffectState (vec3_t org, vec3_t dir, float count,
|
||||||
|
|
||||||
static float Classic_ParticleTrail (vec3_t start, vec3_t end, float leftover, effect_type_t type)
|
static float Classic_ParticleTrail (vec3_t start, vec3_t end, float leftover, effect_type_t type)
|
||||||
{
|
{
|
||||||
vec3_t point, delta, dir;
|
vec3_t point, delta, dir, step;
|
||||||
float len, rlen, scale;
|
float len, rlen, scale;
|
||||||
int i, j, num_particles;
|
int i, j, num_particles;
|
||||||
cparticle_t *p;
|
cparticle_t *p;
|
||||||
|
@ -1002,7 +1002,6 @@ static float Classic_ParticleTrail (vec3_t start, vec3_t end, float leftover, ef
|
||||||
VectorScale(delta, 1 / len, dir); //unit vector in direction of trail
|
VectorScale(delta, 1 / len, dir); //unit vector in direction of trail
|
||||||
|
|
||||||
VectorMA(point, -leftover, dir, point);
|
VectorMA(point, -leftover, dir, point);
|
||||||
Con_Printf("%g %g\n", len, leftover);
|
|
||||||
len += leftover;
|
len += leftover;
|
||||||
rlen = len;
|
rlen = len;
|
||||||
|
|
||||||
|
@ -1022,7 +1021,7 @@ static float Classic_ParticleTrail (vec3_t start, vec3_t end, float leftover, ef
|
||||||
|
|
||||||
scale /= r_part_density.value;
|
scale /= r_part_density.value;
|
||||||
|
|
||||||
VectorScale (dir, scale, dir);
|
VectorScale (dir, scale, step);
|
||||||
|
|
||||||
len /= scale;
|
len /= scale;
|
||||||
leftover = rlen - ((int)(len) * scale);
|
leftover = rlen - ((int)(len) * scale);
|
||||||
|
@ -1073,14 +1072,14 @@ static float Classic_ParticleTrail (vec3_t start, vec3_t end, float leftover, ef
|
||||||
|
|
||||||
VectorCopy (point, p->org);
|
VectorCopy (point, p->org);
|
||||||
if (tracercount & 1)
|
if (tracercount & 1)
|
||||||
{
|
{ //the addition of /scale here counters dir being rescaled
|
||||||
p->vel[0] = 90 * dir[1];
|
p->vel[0] = 30 * dir[1];
|
||||||
p->vel[1] = 90 * -dir[0];
|
p->vel[1] = 30 * -dir[0];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
p->vel[0] = 90 * -dir[1];
|
p->vel[0] = 30 * -dir[1];
|
||||||
p->vel[1] = 90 * dir[0];
|
p->vel[1] = 30 * dir[0];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VOOR_TRAIL:
|
case VOOR_TRAIL:
|
||||||
|
@ -1106,7 +1105,7 @@ static float Classic_ParticleTrail (vec3_t start, vec3_t end, float leftover, ef
|
||||||
p->org[j] = point[j] + ((rand() % 6) - 3);
|
p->org[j] = point[j] + ((rand() % 6) - 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
VectorAdd (point, dir, point);
|
VectorAdd (point, step, point);
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
return leftover;
|
return leftover;
|
||||||
|
|
|
@ -816,12 +816,24 @@ static struct charcache_s *Font_LoadPlaceholderGlyph(font_t *f, CHARIDXTYPE char
|
||||||
memset(out, 0xff, w*4*h);
|
memset(out, 0xff, w*4*h);
|
||||||
}
|
}
|
||||||
else if (charidx == 0xe00b)
|
else if (charidx == 0xe00b)
|
||||||
{
|
{ //console input cursor
|
||||||
h = min(16,f->charheight);
|
h = min(16,f->charheight);
|
||||||
w = max(1,h/8);
|
w = max(1,h/8);
|
||||||
d = 1;
|
d = 1;
|
||||||
memset(out, 0xff, w*4*h);
|
memset(out, 0xff, w*4*h);
|
||||||
}
|
}
|
||||||
|
else if (charidx == 0xe00d)
|
||||||
|
{ //filled > arrow indicator (used by the menus)
|
||||||
|
h = min(16,f->charheight);
|
||||||
|
w = (h+1)/2;
|
||||||
|
d = 1;
|
||||||
|
memset(out, 0xff, w*4*h);
|
||||||
|
for (i = 0; i < w; i++)
|
||||||
|
{
|
||||||
|
memset(out + w*i + (i+1), 0x0, (w-i-1)*4);
|
||||||
|
memset(out + w*(h-i-1) + (i+1), 0x0, (w-i-1)*4);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
d = (f->charheight >= 11);
|
d = (f->charheight >= 11);
|
||||||
|
@ -2087,6 +2099,8 @@ struct font_s *Font_LoadFont(float vheight, const char *fontfilename)
|
||||||
|
|
||||||
if (defaultplane != INVALIDPLANE)
|
if (defaultplane != INVALIDPLANE)
|
||||||
{
|
{
|
||||||
|
if (fmt==FMT_AUTO)
|
||||||
|
fmt=FMT_QUAKE;
|
||||||
if (!f->faces)
|
if (!f->faces)
|
||||||
{
|
{
|
||||||
static const unsigned short iso88591[] = {
|
static const unsigned short iso88591[] = {
|
||||||
|
@ -2107,9 +2121,6 @@ struct font_s *Font_LoadFont(float vheight, const char *fontfilename)
|
||||||
const unsigned short *c1;
|
const unsigned short *c1;
|
||||||
unsigned int c1size;
|
unsigned int c1size;
|
||||||
|
|
||||||
if (fmt==FMT_AUTO)
|
|
||||||
fmt=FMT_QUAKE;
|
|
||||||
|
|
||||||
if (fmt == FMT_WINDOWS1252)
|
if (fmt == FMT_WINDOWS1252)
|
||||||
{ //some tools use these extra ones (latin-1 has no visible c1 entries)
|
{ //some tools use these extra ones (latin-1 has no visible c1 entries)
|
||||||
c1 = win1252;
|
c1 = win1252;
|
||||||
|
|
|
@ -662,7 +662,11 @@ void SV_Map_f (void)
|
||||||
|
|
||||||
#ifndef SERVERONLY
|
#ifndef SERVERONLY
|
||||||
if (!isDedicated) //otherwise, info used on map loading isn't present
|
if (!isDedicated) //otherwise, info used on map loading isn't present
|
||||||
Cmd_ExecuteString(va("fullserverinfo \"%s\"\n", svs.info), RESTRICT_SERVER);
|
{
|
||||||
|
cl.haveserverinfo = true;
|
||||||
|
Q_strncpyz (cl.serverinfo, svs.info, sizeof(cl.serverinfo));
|
||||||
|
CL_CheckServerInfo();
|
||||||
|
}
|
||||||
|
|
||||||
if (!sv.state && cls.state)
|
if (!sv.state && cls.state)
|
||||||
CL_Disconnect();
|
CL_Disconnect();
|
||||||
|
|
Loading…
Reference in a new issue