From cfa0ea2a65533dd25d87f0cfab3b0576f4bef0df Mon Sep 17 00:00:00 2001 From: pogokeen Date: Tue, 25 Jun 2019 18:35:22 +0000 Subject: [PATCH] game.cpp: When A_Spawn() is spawning from an already existing sprite, do not reset the owner field if it has been overridden from the default. git-svn-id: https://svn.eduke32.com/eduke32@7738 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/game.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index d69745e2a..3c4849a2e 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -1445,7 +1445,10 @@ int A_Spawn(int spriteNum, int tileNum) if (s.picnum == SECTOREFFECTOR && s.lotag == 50) a.picnum = s.owner; - s.owner = a.owner = newSprite; + if (s.owner == -1) + s.owner = a.owner = newSprite; + else + a.owner = s.owner; a.floorz = sector[s.sectnum].floorz; a.ceilingz = sector[s.sectnum].ceilingz;