Reset player action in pause menu for network, fix #3230
This commit is contained in:
parent
f5035a00ea
commit
a5b234ceef
@ -25,6 +25,8 @@
|
|||||||
#include "guiengine/scalable_font.hpp"
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/widgets/icon_button_widget.hpp"
|
#include "guiengine/widgets/icon_button_widget.hpp"
|
||||||
#include "guiengine/widgets/ribbon_widget.hpp"
|
#include "guiengine/widgets/ribbon_widget.hpp"
|
||||||
|
#include "karts/controller/controller.hpp"
|
||||||
|
#include "karts/kart.hpp"
|
||||||
#include "input/input_manager.hpp"
|
#include "input/input_manager.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "modes/overworld.hpp"
|
#include "modes/overworld.hpp"
|
||||||
@ -66,6 +68,18 @@ RacePausedDialog::RacePausedDialog(const float percentWidth,
|
|||||||
{
|
{
|
||||||
music_manager->pauseMusic();
|
music_manager->pauseMusic();
|
||||||
SFXManager::get()->pauseAll();
|
SFXManager::get()->pauseAll();
|
||||||
|
for (unsigned i = 0; i < World::getWorld()->getNumKarts(); i++)
|
||||||
|
{
|
||||||
|
for (unsigned j = 0; j < PA_PAUSE_RACE; j++)
|
||||||
|
{
|
||||||
|
if (World::getWorld()->getKart(i)->isEliminated() ||
|
||||||
|
!World::getWorld()->getKart(i)->getController()
|
||||||
|
->isLocalPlayerController())
|
||||||
|
break;
|
||||||
|
World::getWorld()->getKart(i)->getController()
|
||||||
|
->action((PlayerAction)j, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user