1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

* fixed blocked shooter behavior

* slowed map scrolling
* minor
This commit is contained in:
Michał W. Urbańczyk
2008-10-11 13:14:52 +00:00
parent 7104326563
commit 4af64f1b9f
9 changed files with 70 additions and 45 deletions

View File

@ -1200,40 +1200,43 @@ void CAdvMapInt::update()
}
++heroAnim;
if(scrollingLeft)
if(animValHitCount % 4)
{
if(position.x>-Woff)
if(scrollingLeft)
{
position.x--;
updateScreen = true;
updateMinimap=true;
if(position.x>-Woff)
{
position.x--;
updateScreen = true;
updateMinimap=true;
}
}
}
if(scrollingRight)
{
if(position.x<CGI->mh->map->width-19+4)
if(scrollingRight)
{
position.x++;
updateScreen = true;
updateMinimap=true;
if(position.x<CGI->mh->map->width-19+4)
{
position.x++;
updateScreen = true;
updateMinimap=true;
}
}
}
if(scrollingUp)
{
if(position.y>-Hoff)
if(scrollingUp)
{
position.y--;
updateScreen = true;
updateMinimap=true;
if(position.y>-Hoff)
{
position.y--;
updateScreen = true;
updateMinimap=true;
}
}
}
if(scrollingDown)
{
if(position.y<CGI->mh->map->height-18+4)
if(scrollingDown)
{
position.y++;
updateScreen = true;
updateMinimap=true;
if(position.y<CGI->mh->map->height-18+4)
{
position.y++;
updateScreen = true;
updateMinimap=true;
}
}
}
if(updateScreen)