mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
Fix issue where sometimes hitscan projectile trails weren't spawning
git-svn-id: https://svn.eduke32.com/eduke32@5726 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0de66c3411
commit
a3b3a992c0
1 changed files with 3 additions and 4 deletions
|
@ -140,10 +140,9 @@ static inline projectile_t * Proj_GetProjectile(int tile)
|
|||
return ((unsigned)tile < MAXTILES && g_tile[tile].proj) ? g_tile[tile].proj : &DefaultProjectile;
|
||||
}
|
||||
|
||||
static void A_HitscanProjTrail(const vec3_t *sv, const vec3_t *dv, int32_t ang, int32_t atwith)
|
||||
static void A_HitscanProjTrail(const vec3_t *sv, const vec3_t *dv, int32_t ang, int32_t atwith, int16_t sect)
|
||||
{
|
||||
int32_t n, j, i;
|
||||
int16_t sect = -1;
|
||||
vec3_t srcvect;
|
||||
vec3_t destvect;
|
||||
|
||||
|
@ -170,7 +169,7 @@ static void A_HitscanProjTrail(const vec3_t *sv, const vec3_t *dv, int32_t ang,
|
|||
srcvect.x += destvect.x;
|
||||
srcvect.y += destvect.y;
|
||||
srcvect.z += destvect.z;
|
||||
updatesector(srcvect.x,srcvect.y,§);
|
||||
updatesectorz(srcvect.x,srcvect.y,srcvect.z,§);
|
||||
if (sect < 0)
|
||||
break;
|
||||
getzsofslope(sect,srcvect.x,srcvect.y,&n,&j);
|
||||
|
@ -911,7 +910,7 @@ static int32_t A_ShootCustom(const int32_t i, const int32_t atwith, int16_t sa,
|
|||
return -1;
|
||||
|
||||
if (proj->trail >= 0)
|
||||
A_HitscanProjTrail(srcvect, &hit.pos, sa, atwith);
|
||||
A_HitscanProjTrail(srcvect, &hit.pos, sa, atwith, sect);
|
||||
|
||||
if (proj->workslike & PROJECTILE_WATERBUBBLES)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue