From a3fdf481e04684a54a7e4fc33b07f7cbc82812ef Mon Sep 17 00:00:00 2001
From: HoelShare <git@hoelshare.de>
Date: Sun, 28 May 2017 10:27:47 +0200
Subject: [PATCH] GPN

---
 GPN_BadgeLasertag.ino | 3 ++-
 GameClient.cpp        | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/GPN_BadgeLasertag.ino b/GPN_BadgeLasertag.ino
index 2750a43..a77138a 100644
--- a/GPN_BadgeLasertag.ino
+++ b/GPN_BadgeLasertag.ino
@@ -46,6 +46,8 @@ unsigned long lastChange = 0;
 unsigned long lastNotificationPull = 0;
 
 void setup() {
+
+    SPIFFS.begin();
     badge.init();
     char *nickname = loadNick();
     player = new Player(&badge, nickname);
@@ -60,7 +62,6 @@ void setup() {
     role_menu->addMenuItem(new MenuItem("Join", joinGame));
     ui->draw();
     rboot_config rboot_config = rboot_get_config();
-    SPIFFS.begin();
     File f = SPIFFS.open("/rom" + String(rboot_config.current_rom), "w");
     f.println("Lasertag\n");
     connectBadge();
diff --git a/GameClient.cpp b/GameClient.cpp
index 72ef36b..16b6d8f 100644
--- a/GameClient.cpp
+++ b/GameClient.cpp
@@ -14,7 +14,7 @@ void GameClient::createUIGameStart() {
     Serial.println("GameClient::createUIGameStart - new PlayerListMenu");
     playerList->setLeftAction([=]() { this->player->prevWeapon(); });
     playerList->setRightAction([=]() { this->player->nextWeapon(); });
-    playerList->setDownAction([=]() { this->player->reload(); });
+//    playerList->setDownAction([=]() { this->player->reload(); });
     playerList->setEnterAction([=]() { this->player->shot(); });
     Serial.println("GameClient::createUIGameStart - set Lambdas");
     MenuItem *healthMI = new MenuItem("100%", []() {});
@@ -31,6 +31,7 @@ void GameClient::createUIGameStart() {
     playerList->addMenuItem(nameMI);
     Serial.println("GameClient::createUIGameStart - added Lambdas");
     ui->open(playerList);
+    playerList->setDirty();
     Serial.println("GameClient::createUIGameStart - Ende");
 }
 
-- 
GitLab