From f71e256b8f64fae1c6bd32638fe9c0566907847c Mon Sep 17 00:00:00 2001 From: Alisson Nunes Date: Sun, 9 Jul 2017 23:42:53 -0300 Subject: [PATCH] =?UTF-8?q?Arrumado=20problema=20de=20n=C3=A3o=20zerar=20p?= =?UTF-8?q?lacar=20em=20nova=20partida?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Cara_cracha.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Cara_cracha.cpp b/src/Cara_cracha.cpp index 5173225..acd708e 100644 --- a/src/Cara_cracha.cpp +++ b/src/Cara_cracha.cpp @@ -436,8 +436,12 @@ bool Cara_cracha::init() { bool Cara_cracha::update() { int tela_id_antiga = this->tela_id; // Verifica se é necessário reiniciar o tempo this->event.update(); - if ((tela_id_antiga == 0 || tela_id_antiga == 3) && this->tela_id == 1) // Sai da tela inicial ou da tela final e vai para a tela de inicio de jogo + if ((tela_id_antiga == 0 || tela_id_antiga == 3) && this->tela_id == 1) { // Sai da tela inicial ou da tela final e vai para a tela de inicio de jogo this->hora = HORA_INICIO_JOGO; + this->pontua_prov = 0; + for (int i = 0; i < 4; i++) + this->count_criterios[i] = 0; + } if (this->tela_id == 1 || this->tela_id == 2) { // Atualiza as informações apenas durante o jogo