Reset all actions in suitable function for local game restart

This commit is contained in:
Benau 2018-07-08 13:58:19 +08:00
parent 17d1bddf0d
commit e67f0db7c1

View File

@ -58,7 +58,6 @@ LocalPlayerController::LocalPlayerController(AbstractKart *kart,
PerPlayerDifficulty d) PerPlayerDifficulty d)
: PlayerController(kart), m_sky_particles_emitter(NULL) : PlayerController(kart), m_sky_particles_emitter(NULL)
{ {
m_actions.fill(0);
m_difficulty = d; m_difficulty = d;
m_player = StateManager::get()->getActivePlayer(local_player_id); m_player = StateManager::get()->getActivePlayer(local_player_id);
if(m_player) if(m_player)
@ -115,6 +114,7 @@ LocalPlayerController::~LocalPlayerController()
*/ */
void LocalPlayerController::reset() void LocalPlayerController::reset()
{ {
m_actions.fill(0);
PlayerController::reset(); PlayerController::reset();
m_sound_schedule = false; m_sound_schedule = false;
} // reset } // reset