mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-30 20:51:02 +00:00
- Duke: fixed potential logic deadlocks with the green slimer.
It depended on the devoured actor not disappearing from the map prematurely to work as intended, so a new check had to be added to get out of the deadlock.
This commit is contained in:
parent
e7a0354109
commit
77bcea409b
1 changed files with 7 additions and 3 deletions
|
@ -250,12 +250,11 @@ class DukeGreenSlime : DukeActor
|
|||
self.cstat &= ~CSTAT_SPRITE_YFLIP;
|
||||
self.setSpriteSetImage(4);
|
||||
|
||||
if (self.scale.X > 0.5 ) self.scale.X += (-random(0, 7)) * REPEAT_SCALE;
|
||||
if (self.scale.Y > 0.25 ) self.scale.Y += (-random(0, 7)) * REPEAT_SCALE;
|
||||
if (self.scale.X > 0.5 ) self.scale.X -= random(0, 7) * REPEAT_SCALE;
|
||||
if (self.scale.Y > 0.25 ) self.scale.Y -= random(0, 7) * REPEAT_SCALE;
|
||||
else
|
||||
{
|
||||
self.scale = (0.625, 0.25);
|
||||
self.temp_actor = nullptr;
|
||||
self.temp_data[0] = 0;
|
||||
}
|
||||
|
||||
|
@ -281,6 +280,7 @@ class DukeGreenSlime : DukeActor
|
|||
else
|
||||
{
|
||||
self.temp_data[0] = -1;
|
||||
self.temp_actor = nullptr;
|
||||
double dist = (self.pos.XY - s5.pos.XY).LengthSquared();
|
||||
if (dist < 48*48) {
|
||||
s5.scale.X = 0;
|
||||
|
@ -288,6 +288,10 @@ class DukeGreenSlime : DukeActor
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self.temp_data[0] = -1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue