- Duke/RR: fixed hitradius

The recent optimization did not update the sector pointer inside the loop
This commit is contained in:
Christoph Oelckers 2021-11-15 00:18:52 +01:00
parent dc1d97b6bd
commit aac02d52db
2 changed files with 2 additions and 0 deletions

View file

@ -361,6 +361,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
do
{
dasect = tempsect[sectcnt++];
dasectp = &sector[dasect];
if (((dasectp->ceilingz - spri->z) >> 8) < r)
{
d = abs(wall[dasectp->wallptr].x - spri->x) + abs(wall[dasectp->wallptr].y - spri->y);

View file

@ -241,6 +241,7 @@ void hitradius_r(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
do
{
dasect = tempsect[sectcnt++];
dasectp = &sector[dasect];
if (((dasectp->ceilingz - spri->z) >> 8) < r)
{
d = abs(wall[dasectp->wallptr].x - spri->x) + abs(wall[dasectp->wallptr].y - spri->y);