mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- floatified Blood’s kViewEffectTrail
This commit is contained in:
parent
b73314579a
commit
5fba68ffe1
1 changed files with 6 additions and 7 deletions
|
@ -241,14 +241,14 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
||||||
}
|
}
|
||||||
case kViewEffectTrail:
|
case kViewEffectTrail:
|
||||||
{
|
{
|
||||||
int nAng = pTSprite->int_ang();
|
auto nAng = pTSprite->angle;
|
||||||
if (pTSprite->cstat & CSTAT_SPRITE_ALIGNMENT_WALL)
|
if (pTSprite->cstat & CSTAT_SPRITE_ALIGNMENT_WALL)
|
||||||
{
|
{
|
||||||
nAng = (nAng + 512) & 2047;
|
nAng += DAngle90;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nAng = (nAng + 1024) & 2047;
|
nAng += DAngle180;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 5; i++)
|
for (int i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
|
@ -257,10 +257,9 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
||||||
if (!pNSprite)
|
if (!pNSprite)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
int nLen = 128 + (i << 7);
|
double nLen = 8.0 * (i + 1);
|
||||||
int x = MulScale(nLen, Cos(nAng), 30);
|
auto vect = nAng.ToVector() * nLen;
|
||||||
int y = MulScale(nLen, Sin(nAng), 30);
|
pNSprite->pos = pTSprite->pos + vect;
|
||||||
pNSprite->set_int_pos({ pTSprite->int_pos().X + x, pTSprite->int_pos().Y + y, pTSprite->int_pos().Z });
|
|
||||||
assert(pSector);
|
assert(pSector);
|
||||||
auto pSector2 = pSector;
|
auto pSector2 = pSector;
|
||||||
updatesectorz(pNSprite->pos, &pSector2);
|
updatesectorz(pNSprite->pos, &pSector2);
|
||||||
|
|
Loading…
Reference in a new issue