mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
Fix use of an uninitialized variable in P_FindWall->FindDistance2D with noclip.
git-svn-id: https://svn.eduke32.com/eduke32@2344 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
967a3ec697
commit
b04e743236
1 changed files with 3 additions and 1 deletions
|
@ -3046,6 +3046,8 @@ static int32_t P_FindWall(DukePlayer_t *p,int16_t *hitw)
|
||||||
0,&hitinfo,CLIPMASK0);
|
0,&hitinfo,CLIPMASK0);
|
||||||
|
|
||||||
*hitw = hitinfo.hitwall;
|
*hitw = hitinfo.hitwall;
|
||||||
|
if (hitinfo.hitwall < 0)
|
||||||
|
return INT32_MAX;
|
||||||
|
|
||||||
return (FindDistance2D(hitinfo.pos.x-p->pos.x,hitinfo.pos.y-p->pos.y));
|
return (FindDistance2D(hitinfo.pos.x-p->pos.x,hitinfo.pos.y-p->pos.y));
|
||||||
}
|
}
|
||||||
|
@ -3145,7 +3147,7 @@ void P_CheckSectors(int32_t snum)
|
||||||
|
|
||||||
i = P_FindWall(p,&hitscanwall);
|
i = P_FindWall(p,&hitscanwall);
|
||||||
|
|
||||||
if (i < 1280 && hitscanwall >= 0 && wall[hitscanwall].overpicnum == MIRROR)
|
if (hitscanwall >= 0 && i < 1280 && wall[hitscanwall].overpicnum == MIRROR)
|
||||||
if (wall[hitscanwall].lotag > 0 && !A_CheckSoundPlaying(p->i,wall[hitscanwall].lotag) && snum == screenpeek)
|
if (wall[hitscanwall].lotag > 0 && !A_CheckSoundPlaying(p->i,wall[hitscanwall].lotag) && snum == screenpeek)
|
||||||
{
|
{
|
||||||
A_PlaySound(wall[hitscanwall].lotag,p->i);
|
A_PlaySound(wall[hitscanwall].lotag,p->i);
|
||||||
|
|
Loading…
Reference in a new issue