mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
Fix bug where adventure map is not displayed correctly when hero is moving.
This commit is contained in:
@ -575,8 +575,9 @@ void CMapHandler::terrainRect(int3 top_tile, unsigned char anim, std::vector< st
|
|||||||
if (moveX != 0) {
|
if (moveX != 0) {
|
||||||
dx++;
|
dx++;
|
||||||
srx_init += moveX;
|
srx_init += moveX;
|
||||||
if (moveX < 0) {
|
if (moveX > 0) {
|
||||||
// Moving left, so adjust our referential
|
// Moving right. We still need to draw the old tile on the
|
||||||
|
// left, so adjust our referential
|
||||||
top_tile.x --;
|
top_tile.x --;
|
||||||
srx_init -= 32;
|
srx_init -= 32;
|
||||||
}
|
}
|
||||||
@ -585,8 +586,9 @@ void CMapHandler::terrainRect(int3 top_tile, unsigned char anim, std::vector< st
|
|||||||
if (moveY != 0) {
|
if (moveY != 0) {
|
||||||
dy++;
|
dy++;
|
||||||
sry_init += moveY;
|
sry_init += moveY;
|
||||||
if (moveY < 0) {
|
if (moveY > 0) {
|
||||||
// Moving up, so adjust our referential
|
// Moving down. We still need to draw the tile on the top,
|
||||||
|
// so adjust our referential.
|
||||||
top_tile.y --;
|
top_tile.y --;
|
||||||
sry_init -= 32;
|
sry_init -= 32;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user