Skip to content

Commit

Permalink
- transfer the nofloorfire flag to the flame actor.
Browse files Browse the repository at this point in the history
When checked on the owner it can fall victim to garbage collection.
  • Loading branch information
coelckers committed Mar 27, 2023
1 parent cf89d06 commit 7a7022a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions wadsrc/static/zscript/games/duke/actors/burning.zs
Expand Up @@ -55,9 +55,11 @@ class DukeBurning : DukeActor
}
}
t.cstat |= CSTAT_SPRITE_YCENTER;
/*
double d;
if (!OwnerAc || !OwnerAc.bNOFLOORFIRE)
if (!bNOFLOORFIRE)
[d, t.pos.Z] = t.sector.getSlopes(t.pos.XY);
*/
return false;
}
}
Expand All @@ -84,8 +86,7 @@ class RedneckFire : DukeActor
{
let OwnerAc = self.ownerActor;
double d;
if (!OwnerAc || !OwnerAc.bNOFLOORFIRE)
[d, t.pos.Z] = t.sector.getSlopes(t.pos.XY);
[d, t.pos.Z] = t.sector.getSlopes(t.pos.XY);
return false;
}
}
Expand Down
3 changes: 2 additions & 1 deletion wadsrc/static/zscript/games/duke/actors/flammables.zs
Expand Up @@ -71,7 +71,8 @@ class DukeFlammable : DukeActor
{
self.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
self.counter = 1;
self.spawn("DukeBurning");
let burn = self.spawn("DukeBurning");
if (burn) burn.bNoFloorFire = self.bNoFloorFire;
}
}
}
Expand Down

0 comments on commit 7a7022a

Please sign in to comment.