summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-06-30 15:08:59 +0200
committerLaG1924 <lag1924@gmail.com>2021-07-02 08:46:28 +0200
commit12990cee44efdae378ffbfb4d717ed8a1eafc6dc (patch)
tree341e977ab190d64e59af3d8afa44da08bd2eb410 /src
parentAdded more debug values (diff)
downloadAltCraft-12990cee44efdae378ffbfb4d717ed8a1eafc6dc.tar
AltCraft-12990cee44efdae378ffbfb4d717ed8a1eafc6dc.tar.gz
AltCraft-12990cee44efdae378ffbfb4d717ed8a1eafc6dc.tar.bz2
AltCraft-12990cee44efdae378ffbfb4d717ed8a1eafc6dc.tar.lz
AltCraft-12990cee44efdae378ffbfb4d717ed8a1eafc6dc.tar.xz
AltCraft-12990cee44efdae378ffbfb4d717ed8a1eafc6dc.tar.zst
AltCraft-12990cee44efdae378ffbfb4d717ed8a1eafc6dc.zip
Diffstat (limited to '')
-rw-r--r--src/GameState.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/GameState.cpp b/src/GameState.cpp
index be408dd..bb93c45 100644
--- a/src/GameState.cpp
+++ b/src/GameState.cpp
@@ -6,6 +6,7 @@
#include "Event.hpp"
#include "Packet.hpp"
+#include "Game.hpp"
void GameState::Update(double deltaTime) {
OPTICK_EVENT();
@@ -383,7 +384,6 @@ void GameState::UpdatePacket(std::shared_ptr<Packet> ptr) {
auto packetResponse = std::make_shared<PacketTeleportConfirm>(packet->TeleportId);
PUSH_EVENT("SendPacket", std::static_pointer_cast<Packet>(packetResponse));
-
break;
}
@@ -418,6 +418,9 @@ void GameState::UpdatePacket(std::shared_ptr<Packet> ptr) {
gameStatus.dimension = packet->Dimension;
gameStatus.difficulty = packet->Difficulty;
gameStatus.levelType = packet->LevelType;
+ SetState(State::Loading);
+ gameStatus.isGameStarted = false;
+ receivedEnoughChunks = false;
break;
}
case EntityHeadLook: