From 7a7022ad3522164fd7a7738a7a5437b373d10fd2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 28 Dec 2022 22:28:38 +0100 Subject: [PATCH] - transfer the nofloorfire flag to the flame actor. When checked on the owner it can fall victim to garbage collection. --- wadsrc/static/zscript/games/duke/actors/burning.zs | 7 ++++--- wadsrc/static/zscript/games/duke/actors/flammables.zs | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/wadsrc/static/zscript/games/duke/actors/burning.zs b/wadsrc/static/zscript/games/duke/actors/burning.zs index 75b41b0fd6c..90b07961e9c 100644 --- a/wadsrc/static/zscript/games/duke/actors/burning.zs +++ b/wadsrc/static/zscript/games/duke/actors/burning.zs @@ -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; } } @@ -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; } } diff --git a/wadsrc/static/zscript/games/duke/actors/flammables.zs b/wadsrc/static/zscript/games/duke/actors/flammables.zs index 077eceff187..cdbb5a4ada3 100644 --- a/wadsrc/static/zscript/games/duke/actors/flammables.zs +++ b/wadsrc/static/zscript/games/duke/actors/flammables.zs @@ -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; } } }