mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
Take slope heights into account in A_RadiusDamage()
git-svn-id: https://svn.eduke32.com/eduke32@8101 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0cba9d2036
commit
48ca8f01aa
1 changed files with 7 additions and 5 deletions
|
@ -268,25 +268,27 @@ void A_RadiusDamage(int const spriteNum, int const blastRadius, int const dmg1,
|
||||||
{
|
{
|
||||||
int const sectorNum = sectorList[sectorCount++];
|
int const sectorNum = sectorList[sectorCount++];
|
||||||
auto const &listSector = sector[sectorNum];
|
auto const &listSector = sector[sectorNum];
|
||||||
|
vec2_t closest;
|
||||||
|
|
||||||
if (getsectordist(pSprite->pos.vec2, sectorNum) >= blastRadius)
|
if (getsectordist(pSprite->pos.vec2, sectorNum, &closest) >= blastRadius)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int const startWall = listSector.wallptr;
|
int const startWall = listSector.wallptr;
|
||||||
int const endWall = listSector.wallnum + startWall;
|
int const endWall = listSector.wallnum + startWall;
|
||||||
|
|
||||||
if (((listSector.ceilingz - pSprite->z) >> 8) < blastRadius)
|
int32_t floorZ, ceilZ;
|
||||||
|
getzsofslope(sectorNum, closest.x, closest.y, &ceilZ, &floorZ);
|
||||||
|
|
||||||
|
if (((ceilZ - pSprite->z) >> 8) < blastRadius)
|
||||||
Sect_DamageCeiling_Internal(spriteNum, sectorNum);
|
Sect_DamageCeiling_Internal(spriteNum, sectorNum);
|
||||||
|
|
||||||
if (((pSprite->z - listSector.floorz) >> 8) < blastRadius)
|
if (((pSprite->z - floorZ) >> 8) < blastRadius)
|
||||||
Sect_DamageFloor_Internal(spriteNum, sectorNum);
|
Sect_DamageFloor_Internal(spriteNum, sectorNum);
|
||||||
|
|
||||||
int w = startWall;
|
int w = startWall;
|
||||||
|
|
||||||
for (auto pWall = (uwallptr_t)&wall[startWall]; w < endWall; ++w, ++pWall)
|
for (auto pWall = (uwallptr_t)&wall[startWall]; w < endWall; ++w, ++pWall)
|
||||||
{
|
{
|
||||||
vec2_t closest;
|
|
||||||
|
|
||||||
if (getwalldist(pSprite->pos.vec2, w, &closest) >= blastRadius)
|
if (getwalldist(pSprite->pos.vec2, w, &closest) >= blastRadius)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue