From 1c2a691638dfae82093937e8f489331dc8cac9aa Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sat, 16 Dec 2023 14:01:08 -0500 Subject: [PATCH] Bullet Time is slow. --- SQCSim-common/SQCSim-common.vcxproj | 2 +- SQCSim-common/bullet.cpp | 4 ++-- SQCSim-common/define.h | 2 +- SQCSim-srv/SQCSim-srv.vcxproj | 2 +- SQCSim-srv/server.cpp | 2 +- SQCSim2021/SQCSim2021.vcxproj | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SQCSim-common/SQCSim-common.vcxproj b/SQCSim-common/SQCSim-common.vcxproj index c618082..4ba7bd4 100644 --- a/SQCSim-common/SQCSim-common.vcxproj +++ b/SQCSim-common/SQCSim-common.vcxproj @@ -48,7 +48,7 @@ StaticLibrary false - ClangCL + v143 true Unicode diff --git a/SQCSim-common/bullet.cpp b/SQCSim-common/bullet.cpp index 87412da..ab3d18e 100644 --- a/SQCSim-common/bullet.cpp +++ b/SQCSim-common/bullet.cpp @@ -18,10 +18,10 @@ bool Bullet::Update(World* world, float elapsedtime, int perframe, std::unordere for (auto& [key, player] : mapPlayer) { bool hit = false; - if ((m_currentpos - player->GetPosition()).Length() < 1.f) { + if ((m_currentpos - player->GetPosition()).Length() < .5f) { hit = true; } - if ((m_currentpos - player->GetPOV()).Length() < .2f) { + else if ((m_currentpos - player->GetPOV()).Length() < .2f) { damage *= 2; // HEADSHOT! hit = true; } diff --git a/SQCSim-common/define.h b/SQCSim-common/define.h index a684da9..f6737af 100644 --- a/SQCSim-common/define.h +++ b/SQCSim-common/define.h @@ -35,7 +35,7 @@ #define TIME_DAMAGE_BOOST 10 //secondes #define TIME_INVINCIBLE_BOOST 4 //secondes #define STRENGTH_SPEED_BOOST 10 //Pourcentage -#define BULLET_TIME .1 +#define BULLET_TIME .2 #define SYNC_ACC 200 // ms #define CMOD_ACC 1500 // ms diff --git a/SQCSim-srv/SQCSim-srv.vcxproj b/SQCSim-srv/SQCSim-srv.vcxproj index b0dcd9c..d080276 100644 --- a/SQCSim-srv/SQCSim-srv.vcxproj +++ b/SQCSim-srv/SQCSim-srv.vcxproj @@ -48,7 +48,7 @@ Application false - ClangCL + v143 true Unicode diff --git a/SQCSim-srv/server.cpp b/SQCSim-srv/server.cpp index 835783a..be92139 100644 --- a/SQCSim-srv/server.cpp +++ b/SQCSim-srv/server.cpp @@ -379,7 +379,7 @@ void Server::Run() { for (auto bull = bullets.begin(); bull != bullets.end(); ++bull) { ChunkMod* cmod = nullptr; Bullet* bullet = *bull; - if (bullet->Update(m_world, (1. / 60.), 100, m_players, &cmod)) { + if (bullet->Update(m_world, (1. / 60.), 20, m_players, &cmod)) { if (cmod) chunkdiffs.emplace_back(cmod); bullit.push_back(bull); diff --git a/SQCSim2021/SQCSim2021.vcxproj b/SQCSim2021/SQCSim2021.vcxproj index 7d14bc6..661f995 100644 --- a/SQCSim2021/SQCSim2021.vcxproj +++ b/SQCSim2021/SQCSim2021.vcxproj @@ -91,7 +91,7 @@ false true Unicode - ClangCL + v143