Skip to content

Commit

Permalink
Fixed: Categorization of "addon" textures in PWAD TEXTURE1/2 lumps
Browse files Browse the repository at this point in the history
This was the cause of the bug where hires replacements were not
being suppressed for IWAD defined textures which are overridden
by custom versions in a PWAD.
  • Loading branch information
danij-deng committed Sep 18, 2012
1 parent e5774e2 commit d50724c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions doomsday/engine/portable/src/r_data.c
Expand Up @@ -1971,13 +1971,18 @@ static patchcompositetex_t** loadPatchCompositeDefs(int* numDefs)
{
hasReplacement = true; // Uses a non-IWAD patch.
}
else if(custom->size.height == orig->size.height &&
custom->size.width == orig->size.width &&
custom->patchCount == orig->patchCount)
// Do the definitions differ?
else if(custom->size.height != orig->size.height ||
custom->size.width != orig->size.width ||
custom->patchCount != orig->patchCount)
{
custom->flags |= TXDF_CUSTOM;
hasReplacement = true;
}
else
{
// Check the patches.
short k = 0;

while(k < orig->patchCount && !(custom->flags & TXDF_CUSTOM))
{
texpatch_t* origP = orig->patches + k;
Expand All @@ -1988,14 +1993,13 @@ static patchcompositetex_t** loadPatchCompositeDefs(int* numDefs)
origP->offY != customP->offY)
{
custom->flags |= TXDF_CUSTOM;
hasReplacement = true;
}
else
{
k++;
}
}

hasReplacement = true;
}

// The non-drawable flag must pass to the replacement.
Expand Down

0 comments on commit d50724c

Please sign in to comment.