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

Various fixes and improvements, mostly for r1093

This commit is contained in:
Michał W. Urbańczyk
2009-08-13 01:03:11 +00:00
parent 69217ff217
commit 2af6d85c23
11 changed files with 116 additions and 111 deletions

View File

@ -1545,9 +1545,20 @@ void CPlayerInterface::newObject( const CGObjectInstance * obj )
}
}
void CPlayerInterface::centerView (int3 pos)
void CPlayerInterface::centerView (int3 pos, int focusTime)
{
LOCPLINT->adventureInt->centerOn (pos);
if(focusTime)
{
bool activeAdv = (GH.topInt() == adventureInt && adventureInt->active);
if(activeAdv)
adventureInt->deactivate();
SDL_Delay(focusTime);
if(activeAdv)
adventureInt->activate();
}
}
void CPlayerInterface::objectRemoved( const CGObjectInstance *obj )