- 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.

This commit is contained in:
Christoph Oelckers 2014-09-13 11:54:19 +02:00
parent 2ada3fe00e
commit de68361f27
1 changed files with 7 additions and 0 deletions

View File

@ -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)