1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00
Fixed crash on catapult shot.
This commit is contained in:
Michał W. Urbańczyk
2009-11-29 02:46:30 +00:00
parent dced6ec17c
commit 85f336cbaa
9 changed files with 31 additions and 10 deletions

View File

@@ -252,7 +252,11 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details)
adventureInt->heroList.draw(screen2);
if(details.result == TryMoveHero::TELEPORTATION || details.start == details.end)
{
adventureInt->paths.erase(ho); //if hero goes through teleport / gate his path will be erased
adventureInt->terrain.currentPath = NULL;
return;
}
int3 hp = details.start;
@@ -1544,6 +1548,11 @@ void CPlayerInterface::objectRemoved( const CGObjectInstance *obj )
}
}
bool CPlayerInterface::ctrlPressed() const
{
return SDL_GetKeyState(NULL)[SDLK_LCTRL] || SDL_GetKeyState(NULL)[SDLK_RCTRL];
}
void SystemOptions::setMusicVolume( int newVolume )
{
musicVolume = newVolume;