mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
PCExhumed: Don't modify coordinates with abs() in runlist_CheckRadialDamage(), correct to original behaviour.
This commit is contained in:
parent
3855eb889e
commit
69aba5f3ea
1 changed files with 4 additions and 9 deletions
|
@ -1577,21 +1577,15 @@ int runlist_CheckRadialDamage(short nSprite)
|
||||||
int y = (sprite[nSprite].y - sprite[nRadialSpr].y) >> 8;
|
int y = (sprite[nSprite].y - sprite[nRadialSpr].y) >> 8;
|
||||||
int z = (sprite[nSprite].z - sprite[nRadialSpr].z) >> 12;
|
int z = (sprite[nSprite].z - sprite[nRadialSpr].z) >> 12;
|
||||||
|
|
||||||
x = klabs(x);
|
if (klabs(x) > nDamageRadius) {
|
||||||
|
|
||||||
if (x > nDamageRadius) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
y = klabs(y);
|
if (klabs(y) > nDamageRadius) {
|
||||||
|
|
||||||
if (y > nDamageRadius) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
z = klabs(z);
|
if (klabs(z) > nDamageRadius) {
|
||||||
|
|
||||||
if (z > nDamageRadius) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1622,6 +1616,7 @@ int runlist_CheckRadialDamage(short nSprite)
|
||||||
else if (edi > 20)
|
else if (edi > 20)
|
||||||
{
|
{
|
||||||
int nAngle = GetMyAngle(x, y);
|
int nAngle = GetMyAngle(x, y);
|
||||||
|
|
||||||
sprite[nSprite].xvel += (edi * Cos(nAngle)) >> 3;
|
sprite[nSprite].xvel += (edi * Cos(nAngle)) >> 3;
|
||||||
sprite[nSprite].yvel += (edi * Sin(nAngle)) >> 3;
|
sprite[nSprite].yvel += (edi * Sin(nAngle)) >> 3;
|
||||||
sprite[nSprite].zvel -= edi * 24;
|
sprite[nSprite].zvel -= edi * 24;
|
||||||
|
|
Loading…
Reference in a new issue