diff --git a/Animator.h b/Animator.h index 0f2d1b5..01d6278 100644 --- a/Animator.h +++ b/Animator.h @@ -11,7 +11,7 @@ #include "Rig.h" // Scale of the "Head" bone (and what hangs off it), around the neck. 1 = as authored. -inline float HeadScale = 0.25f; +inline float HeadScale = 1.0f; struct AssimpNodeData { diff --git a/Engine.cpp b/Engine.cpp index 5e9f538..2945248 100644 --- a/Engine.cpp +++ b/Engine.cpp @@ -384,16 +384,17 @@ void Engine::Initiate() pos.z - size.z * 0.5f, pos.z + size.z * 0.5f }); }; // Concentric stack of square tiers, widest at the bottom (stands in for dome / cone) - auto AddTiers = [&](const char* name, glm::vec2 pos, float baseWidth, float tierHeight, int tiers) { + // xStretch scales the stack along x only (left/right); height and depth are unchanged + auto AddTiers = [&](const char* name, glm::vec2 pos, float baseWidth, float tierHeight, int tiers, float xStretch = 1.0f) { for (int i = 0; i < tiers; ++i) { const float w = baseWidth * (1.0f - float(i) / float(tiers)); - AddBlock(name, { pos.x, tierHeight * i, pos.y }, { w, tierHeight, w }); + AddBlock(name, { pos.x, tierHeight * i, pos.y }, { w * xStretch, tierHeight, w }); } }; // Map is a rectangle: x in [-60, 60], z in [-30, 30] (authored at 1x, scaled by mapScale) // Centre dome - AddTiers("dome", { 0.0f, 0.0f }, 18.0f, 2.0f, 5); + AddTiers("dome", { 0.0f, 0.0f }, 18.0f, 2.0f, 5, 0.5f); // Cones, opposite corners of the dome AddTiers("cone", { -12.0f, -13.0f }, 6.0f, 1.0f, 5); AddTiers("cone", { 12.0f, 13.0f }, 6.0f, 1.0f, 5); @@ -575,7 +576,7 @@ void Engine::Initiate() const int maxHealth = 100; const int bodyDamage = 50; const int punchDamage = 25; - const float headFraction = 0.8f; + const float headFraction = 0.93f; // top 7% of the hitbox counts as the head // Random respawn spot on the floor (NPC and player), kept clear of every map prop std::mt19937 respawnRng(std::random_device{}()); @@ -1089,6 +1090,10 @@ void Engine::Initiate() m->t.ScaleTo(1.0f); m->BindToRenderSystem(); mainf->AddChild(m); + // Solid for the local player, but moved only by the host's stream (like the floor, never simulated here) + p* cubeBody = new p(m); + cubeBody->velocity = false; + physicsengine->AddObject(cubeBody); it = puppetCubes.emplace(nc.id, PuppetCube{ m, now }).first; } it->second.mesh->t.TranslateTo(nc.position); @@ -1098,6 +1103,7 @@ void Engine::Initiate() for (auto it = puppetCubes.begin(); it != puppetCubes.end();) { if (now - it->second.lastSeen > 1.5) { rendersystem->RemoveRenderable(it->second.mesh); + physicsengine->RemoveObject(it->second.mesh); it->second.mesh->Delete(); it = puppetCubes.erase(it); } diff --git a/main.cpp b/main.cpp index 5d7220b..412b850 100644 --- a/main.cpp +++ b/main.cpp @@ -129,11 +129,9 @@ static void PromptSensitivity() { catch (...) {} // empty / not a number: keep the default }; std::cout << "\n=== MOUSE ===\n"; - float cm = 0.0f, dpi = 800.0f; + float cm = 0.0f; ask("Sensitivity in cm per 360 degrees [default]: ", cm); - if (cm > 0.0f) ask("Mouse DPI [800]: ", dpi); StartupCmPer360 = cm; - StartupMouseDpi = dpi; } int main() {