Fixed memory overwrite that happens when the in-game menu is

displayed during the end animations.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5601 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2010-07-01 00:16:09 +00:00
parent 5fcd69554e
commit 61cc735179

View File

@ -671,8 +671,14 @@ void World::unpause()
sfx_manager->resumeAll();
WorldStatus::unpause();
for(unsigned int i=0; i<m_karts.size(); i++)
if(m_karts[i]->getController()->isPlayerController())
((PlayerController*)(m_karts[i]->getController()))->resetInputState();
{
// Note that we can not test for isPlayerController here, since
// an EndController will also return 'isPlayerController' if the
// kart belonged to a player.
PlayerController *pc = dynamic_cast<PlayerController*>(m_karts[i]->getController());
if(pc)
pc->resetInputState();
}
} // pause
/* EOF */