- this better have a null check...

This commit is contained in:
Christoph Oelckers 2021-04-04 13:02:26 +02:00
parent 6ebbf1288d
commit 9828cd7129

View file

@ -2556,26 +2556,29 @@ static void greenslime(DDukeActor *actor)
{ {
auto s5 = actor->temp_actor; auto s5 = actor->temp_actor;
makeitfall(actor); makeitfall(actor);
s5->s.xvel = 0; if (s5)
int l = s5->s.ang;
s->z = s5->s.z;
s->x = s5->s.x + bcos(l, -11);
s->y = s5->s.y + bsin(l, -11);
s->picnum = GREENSLIME + 2 + (global_random & 1);
if (s->yrepeat < 64) s->yrepeat += 2;
else
{ {
if (s->xrepeat < 32) s->xrepeat += 4; s5->s.xvel = 0;
int l = s5->s.ang;
s->z = s5->s.z;
s->x = s5->s.x + bcos(l, -11);
s->y = s5->s.y + bsin(l, -11);
s->picnum = GREENSLIME + 2 + (global_random & 1);
if (s->yrepeat < 64) s->yrepeat += 2;
else else
{ {
t[0] = -1; if (s->xrepeat < 32) s->xrepeat += 4;
x = ldist(actor, s5); else
if (x < 768) { {
s5->s.xrepeat = 0; t[0] = -1;
x = ldist(actor, s5);
if (x < 768) {
s5->s.xrepeat = 0;
}
} }
} }
} }