From de68361f27bcfbc4613e5291ed3872f93441f333 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 13 Sep 2014 11:54:19 +0200 Subject: [PATCH] - fixed: When a sprite is being renamed by Dehacked it also needs to be changed in the list of original sprite names, otherwise any subsequent attempt to use the altered sprite in a frame definition will fail. --- src/d_dehacked.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index e6376a589..d14015ca9 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -2154,6 +2154,13 @@ static int PatchText (int oldSize) { strncpy (deh.PlayerSprite, newStr, 4); } + for (unsigned ii = 0; ii < OrgSprNames.Size(); ii++) + { + if (!stricmp(OrgSprNames[ii].c, oldStr)) + { + strcpy(OrgSprNames[ii].c, newStr); + } + } // If this sprite is used by a pickup, then the DehackedPickup sprite map // needs to be updated too. for (i = 0; (size_t)i < countof(DehSpriteMappings); ++i)