Merge branch 'main' into ShipSpawn

This commit is contained in:
Vladislav Khorev committed 2026-03-05 10:24:17 +03:00
commit 70ef730e86
13 files changed
+292 -152

No files matched your search

+2 -4
View File
@@ -502,7 +502,7 @@ private:
float len = worldForward.norm();
if (len > 1e-6f) worldForward /= len;
pr.vel = worldForward * velocity;
pr.lifeMs = 5000.0f;
pr.lifeMs = 15000.0f;
g_projectiles.push_back(pr);
std::cout << "Server: Created projectile from player " << id_
@@ -670,9 +670,7 @@ void update_world(net::steady_timer& timer, net::io_context& ioc) {
if (!session->fetchStateAtTime(now, targetState)) continue;
Eigen::Vector3f diff = pr.pos - targetState.position;
const float shipRadius = 15.0f;
const float projectileRadius = 1.5f;
float combinedRadius = shipRadius + projectileRadius;
float combinedRadius = shipCollisionRadius + projectileHitRadius;
if (diff.squaredNorm() <= combinedRadius * combinedRadius) {
DeathInfo death;