- the rest of shoot_r.

This commit is contained in:
Christoph Oelckers 2020-10-25 06:14:54 +01:00
parent 47f77a97e4
commit 16089e56f0

View file

@ -835,7 +835,7 @@ void shoot_r(DDukeActor* actor, int atwith)
{ {
spritetype* const s = &actor->s; spritetype* const s = &actor->s;
short sect, sa, p, j; short sect, sa, p;
int sx, sy, sz, vel, zvel, x; int sx, sy, sz, vel, zvel, x;
@ -876,7 +876,6 @@ void shoot_r(DDukeActor* actor, int atwith)
return; return;
} }
int i = actor->GetIndex();
switch (atwith) switch (atwith)
{ {
case BLOODSPLAT1: case BLOODSPLAT1:
@ -942,11 +941,11 @@ void shoot_r(DDukeActor* actor, int atwith)
case CHEERBOMB: case CHEERBOMB:
if (!isRRRA()) break; if (!isRRRA()) break;
case MORTER: case MORTER:
{
if (s->extra >= 0) s->shade = -96; if (s->extra >= 0) s->shade = -96;
j = ps[findplayer(s, &x)].i; auto j = ps[findplayer(actor, &x)].GetActor();
x = ldist(&sprite[j], s); x = ldist(j, actor);
zvel = -x >> 1; zvel = -x >> 1;
@ -958,14 +957,15 @@ void shoot_r(DDukeActor* actor, int atwith)
EGS(sect, EGS(sect,
sx + (sintable[(512 + sa + 512) & 2047] >> 8), sx + (sintable[(512 + sa + 512) & 2047] >> 8),
sy + (sintable[(sa + 512) & 2047] >> 8), sy + (sintable[(sa + 512) & 2047] >> 8),
sz + (6 << 8), atwith, -64, 16, 16, sa, vel, zvel, i, 1); sz + (6 << 8), atwith, -64, 16, 16, sa, vel, zvel, actor, 1);
else else
EGS(sect, EGS(sect,
sx + (sintable[(512 + sa + 512) & 2047] >> 8), sx + (sintable[(512 + sa + 512) & 2047] >> 8),
sy + (sintable[(sa + 512) & 2047] >> 8), sy + (sintable[(sa + 512) & 2047] >> 8),
sz + (6 << 8), atwith, -64, 32, 32, sa, vel, zvel, i, 1); sz + (6 << 8), atwith, -64, 32, 32, sa, vel, zvel, actor, 1);
break; break;
} }
}
return; return;
} }