Corrected bug in multiplayer event dispatch
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4179 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -298,8 +298,19 @@ void EventHandler::processAction(const int action, const unsigned int value, Inp
|
||||
case PA_FIRE:
|
||||
if (pressedDown)
|
||||
{
|
||||
IGUIElement* element = GUIEngine::getGUIEnv()->getFocus();
|
||||
Widget* w = GUIEngine::getWidget( element->getID() );
|
||||
Widget* w = NULL;
|
||||
|
||||
// FIXME: remove special case for player 0
|
||||
if (playerID == 0)
|
||||
{
|
||||
IGUIElement* element = GUIEngine::getGUIEnv()->getFocus();
|
||||
if (element == NULL) break;
|
||||
w = GUIEngine::getWidget( element->getID() );
|
||||
}
|
||||
else
|
||||
{
|
||||
w = GUIEngine::g_focus_for_player[playerID];
|
||||
}
|
||||
if (w == NULL) break;
|
||||
// FIXME : consider returned value?
|
||||
onWidgetActivated( w, playerID );
|
||||
|
||||
Reference in New Issue
Block a user