From 7f9462881c7df63a65c2a80bace41d05dd4eab85 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sat, 16 Dec 2023 15:27:20 -0500 Subject: [PATCH] Oops, all changes! --- SQCSim-common/define.h | 2 +- SQCSim-srv/connection.cpp | 2 +- SQCSim2021/engine.cpp | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SQCSim-common/define.h b/SQCSim-common/define.h index 47a4db0..4ad61c0 100644 --- a/SQCSim-common/define.h +++ b/SQCSim-common/define.h @@ -37,7 +37,7 @@ #define STRENGTH_SPEED_BOOST 10 //Pourcentage #define BULLET_TIME .2 //secondes -#define SYNC_ACC 100 // ms +#define SYNC_ACC 600 // ms #define CMOD_ACC 1000 // ms typedef uint8_t BlockType; diff --git a/SQCSim-srv/connection.cpp b/SQCSim-srv/connection.cpp index c9fd885..19469ad 100644 --- a/SQCSim-srv/connection.cpp +++ b/SQCSim-srv/connection.cpp @@ -213,7 +213,7 @@ Timestamp Connection::Run(World* world) { else out.states.jumpshot = false; if (in.keys.shoot && m_shoot_acc <= 0.) { - Bullets.push_back(std::move(new Bullet(player->GetPOV() + player->GetDirection(), player->GetDirection(), GetHash(true)))); + Bullets.emplace_back(new Bullet(player->GetPOV() + player->GetDirection(), player->GetDirection(), GetHash(true))); m_shoot_acc = BULLET_TIME; } diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index 25f7428..4de61f3 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -679,7 +679,8 @@ void Engine::DisplayInfo(float elapsedTime, BlockType bloc) { ss.str(""); fPosY -= charSize; - ss << " Remote Position : " << m_otherplayerpos; + Vector3f pos = Vector3f(m_otherplayerpos.x + CHUNK_SIZE_X * WORLD_SIZE_X / 2, m_otherplayerpos.y, m_otherplayerpos.z + CHUNK_SIZE_Z * WORLD_SIZE_Y / 2); + ss << " Remote Position : " << pos; PrintText(fPosX, fPosY, ss.str()); ss.str(""); fPosY -= charSize;