mirror of
https://github.com/nzp-team/quakespasm.git
synced 2025-02-17 00:51:20 +00:00
NX/VITA: Fix Muzzleflash offsets (with help from shpuld)
This commit is contained in:
parent
fb428464cb
commit
a47a06b5cb
2 changed files with 39 additions and 42 deletions
|
@ -541,7 +541,7 @@ void CL_RelinkEntities (void)
|
||||||
|
|
||||||
AngleVectors (tempangles, v_forward, v_right, v_up);
|
AngleVectors (tempangles, v_forward, v_right, v_up);
|
||||||
VectorCopy (cl_entities[cl.viewentity].origin, smokeorg);
|
VectorCopy (cl_entities[cl.viewentity].origin, smokeorg);
|
||||||
smokeorg[2] += 32;
|
smokeorg[2] += cl.viewheight;
|
||||||
VectorCopy(smokeorg,start);
|
VectorCopy(smokeorg,start);
|
||||||
|
|
||||||
right_offset = sv_player->v.Flash_Offset[0];
|
right_offset = sv_player->v.Flash_Offset[0];
|
||||||
|
@ -552,9 +552,6 @@ void CL_RelinkEntities (void)
|
||||||
up_offset = up_offset/1000;
|
up_offset = up_offset/1000;
|
||||||
forward_offset = forward_offset/1000;
|
forward_offset = forward_offset/1000;
|
||||||
|
|
||||||
up_offset -= (34 - cl.viewheight);
|
|
||||||
right_offset -= 4;
|
|
||||||
|
|
||||||
VectorMA (start, forward_offset, v_forward ,smokeorg);
|
VectorMA (start, forward_offset, v_forward ,smokeorg);
|
||||||
VectorMA (smokeorg, up_offset, v_up ,smokeorg);
|
VectorMA (smokeorg, up_offset, v_up ,smokeorg);
|
||||||
VectorMA (smokeorg, right_offset, v_right ,smokeorg);
|
VectorMA (smokeorg, right_offset, v_right ,smokeorg);
|
||||||
|
|
|
@ -862,8 +862,7 @@ void AddParticle (part_type_t type, vec3_t org, int count, float size, double ti
|
||||||
case p_muzzleflash3:
|
case p_muzzleflash3:
|
||||||
VectorCopy (org, p->org);
|
VectorCopy (org, p->org);
|
||||||
p->rotspeed = (rand() & 45) - 90;
|
p->rotspeed = (rand() & 45) - 90;
|
||||||
//p->size = size * (rand() % 6) / 4;//r00k
|
p->size = size * (0.75 +((0.05 * (rand() % 20)) * 0.5));//blubs: resultant size range: [size * 0.75, size * 1.25)
|
||||||
p->size = size * (0.85 +((0.05 * (rand() % 16)) * 0.35));//naievil: resultant size range: [size * 0.85, size * 1.1125)
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case p_flare:
|
case p_flare:
|
||||||
|
@ -1717,9 +1716,8 @@ inline static void QMB_UpdateParticles(void)
|
||||||
|
|
||||||
// naievil -- hacky particle drawing...NOT OPTIMIZED
|
// naievil -- hacky particle drawing...NOT OPTIMIZED
|
||||||
void DRAW_PARTICLE_BILLBOARD(particle_texture_t *ptex, particle_t *p, vec3_t *coord) {
|
void DRAW_PARTICLE_BILLBOARD(particle_texture_t *ptex, particle_t *p, vec3_t *coord) {
|
||||||
|
|
||||||
float scale;
|
float scale;
|
||||||
vec3_t up, right, p_up, p_right, p_upright;
|
vec3_t up, right, p_downleft, p_upleft, p_downright, p_upright;
|
||||||
GLubyte color[4], *c;
|
GLubyte color[4], *c;
|
||||||
|
|
||||||
VectorScale (vup, 1.5, up);
|
VectorScale (vup, 1.5, up);
|
||||||
|
@ -1743,19 +1741,21 @@ void DRAW_PARTICLE_BILLBOARD(particle_texture_t *ptex, particle_t *p, vec3_t *co
|
||||||
float subTexBottom = ptex->coords[p->texindex][3];
|
float subTexBottom = ptex->coords[p->texindex][3];
|
||||||
|
|
||||||
glTexCoord2f(subTexLeft, subTexTop);
|
glTexCoord2f(subTexLeft, subTexTop);
|
||||||
glVertex3fv (p->org);
|
VectorMA(p->org, -scale * 0.5, up, p_downleft);
|
||||||
|
VectorMA(p_downleft, -scale * 0.5, right, p_downleft);
|
||||||
|
glVertex3fv (p_downleft);
|
||||||
|
|
||||||
glTexCoord2f(subTexRight, subTexTop);
|
glTexCoord2f(subTexRight, subTexTop);
|
||||||
VectorMA (p->org, scale, up, p_up);
|
VectorMA (p_downleft, scale, up, p_upleft);
|
||||||
glVertex3fv (p_up);
|
glVertex3fv (p_upleft);
|
||||||
|
|
||||||
glTexCoord2f(subTexRight, subTexBottom);
|
glTexCoord2f(subTexRight, subTexBottom);
|
||||||
VectorMA (p_up, scale, right, p_upright);
|
VectorMA (p_upleft, scale, right, p_upright);
|
||||||
glVertex3fv (p_upright);
|
glVertex3fv (p_upright);
|
||||||
|
|
||||||
glTexCoord2f(subTexLeft, subTexBottom);
|
glTexCoord2f(subTexLeft, subTexBottom);
|
||||||
VectorMA (p->org, scale, right, p_right);
|
VectorMA (p_downleft, scale, right, p_downright);
|
||||||
glVertex3fv (p_right);
|
glVertex3fv (p_downright);
|
||||||
|
|
||||||
glEnd ();
|
glEnd ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue