diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index 790ac3470..9ac3db99d 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -5872,7 +5872,7 @@ static void actCheckProjectiles() // // //--------------------------------------------------------------------------- -static TArray affectedXWalls; // keep this outside the function so that it only needs to be allocated once +static TArray affectedXWalls; // keep this outside the function so that it only needs to be allocated once static void actCheckExplosion() { @@ -5912,9 +5912,9 @@ static void actCheckExplosion() const bool newSectCheckMethod = !cl_bloodvanillaexplosions && Owner && Owner->IsDudeActor() && !VanillaMode(); // use new sector checking logic auto sectorMap = GetClosestSpriteSectors(nSector, x, y, radius, &affectedXWalls, newSectCheckMethod); - for (auto& nWall : affectedXWalls) + for (auto pWall : affectedXWalls) { - trTriggerWall(&wall[nWall], kCmdWallImpact); + trTriggerWall(pWall, kCmdWallImpact); } BloodStatIterator it1(kStatDude); diff --git a/source/games/blood/src/gameutil.cpp b/source/games/blood/src/gameutil.cpp index f5a4cbbe3..292ecf547 100644 --- a/source/games/blood/src/gameutil.cpp +++ b/source/games/blood/src/gameutil.cpp @@ -712,7 +712,7 @@ unsigned int ClipMove(vec3_t *pos, int *nSector, int xv, int yv, int wd, int cd, return nRes; } -BitArray GetClosestSpriteSectors(int nSector, int x, int y, int nDist, TArray* pWalls, bool newSectCheckMethod) +BitArray GetClosestSpriteSectors(int nSector, int x, int y, int nDist, TArray* pWalls, bool newSectCheckMethod) { // by default this function fails with sectors that linked with wide spans, or there was more than one link to the same sector. for example... // E6M1: throwing TNT on the stone footpath while standing on the brown road will fail due to the start/end points of the span being too far away. it'll only do damage at one end of the road @@ -753,7 +753,7 @@ BitArray GetClosestSpriteSectors(int nSector, int x, int y, int nDist, TArraytriggerVector && !pXWall->isTriggered && !pXWall->state) - pWalls->Push(wallnum(&wal)); + pWalls->Push(&wal); } } } diff --git a/source/games/blood/src/gameutil.h b/source/games/blood/src/gameutil.h index 8f64dc03e..cad1acd4a 100644 --- a/source/games/blood/src/gameutil.h +++ b/source/games/blood/src/gameutil.h @@ -66,7 +66,7 @@ void GetZRange(DBloodActor *pSprite, int *ceilZ, Collision *ceilHit, int *floorZ void GetZRangeAtXYZ(int x, int y, int z, int nSector, int *ceilZ, Collision *ceilHit, int *floorZ, Collision *floorHit, int nDist, unsigned int nMask, unsigned int nClipParallax = 0); int GetDistToLine(int x1, int y1, int x2, int y2, int x3, int y3); unsigned int ClipMove(vec3_t* pos, int *nSector, int xv, int yv, int wd, int cd, int fd, unsigned int nMask, int tracecount = 3); -BitArray GetClosestSpriteSectors(int nSector, int x, int y, int nDist, TArray* pWalls, bool newSectCheckMethod = false); +BitArray GetClosestSpriteSectors(int nSector, int x, int y, int nDist, TArray* pWalls, bool newSectCheckMethod = false); int picWidth(int nPic, int repeat); int picHeight(int nPic, int repeat);