Browse files

take the anim zpos into account when building the sprite cover

This faithfully reproduces original rendering errors with the water
spouts in BG2 AR2300 and therefore looks like the right thing to do.
  • Loading branch information...
1 parent b9e94af commit d49201fe721d12153d931388262dc1f4c44ea608 @fizzet fizzet committed Jun 26, 2013
Showing with 1 addition and 3 deletions.
  1. +1 −3 gemrb/core/Map.cpp
View
4 gemrb/core/Map.cpp
@@ -3879,9 +3879,7 @@ void AreaAnimation::Draw(const Region &screen, Map *area)
if(covers) {
if(!covers[ac] || !covers[ac]->Covers(Pos.x, Pos.y, frame->XPos, frame->YPos, frame->Width, frame->Height)) {
delete covers[ac];
- // TODO: Should this build a sprite cover with base point
- // Pos.x,Pos.y, or with Pos.y,Pos.y+height ?
- covers[ac] = area->BuildSpriteCover(Pos.x, Pos.y, -anim->animArea.x,
+ covers[ac] = area->BuildSpriteCover(Pos.x, Pos.y + height, -anim->animArea.x,
-anim->animArea.y, anim->animArea.w, anim->animArea.h, 0, true);
}
}

0 comments on commit d49201f

Please sign in to comment.