diff --git a/src/game/game_app.cpp b/src/game/game_app.cpp index 748543a..c323cb8 100644 --- a/src/game/game_app.cpp +++ b/src/game/game_app.cpp @@ -1286,7 +1286,8 @@ void GameApp::render_frame(float alpha) { gp.yaw, gp.pitch, gp.roll, gscale, Vec4(0.45f, 0.85f, 1.0f, 0.45f)}); } for (const auto& rv : sim::get_recovery_visuals(race_sim_.crafts())) { - models.push_back({"RECOV0-0", rv.pos, rv.yaw, 0.0f, 0.0f, 0.55f, Vec4(1, 1, 1, 1)}); + models.push_back({"RECOV0-0", rv.pos, rv.yaw, 0.0f, 0.0f, + sim::kRecoveryVisualScale, Vec4(1, 1, 1, 1)}); } for (const auto& pr : race_sim_.props()) { if (!pr.alive) continue; diff --git a/src/sim/vehicle_defs.hpp b/src/sim/vehicle_defs.hpp index b96c29a..07f6762 100644 --- a/src/sim/vehicle_defs.hpp +++ b/src/sim/vehicle_defs.hpp @@ -33,6 +33,7 @@ struct VehicleSpec { }; inline constexpr float kGlobalSpeedGaugeMax = 33.5f; +inline constexpr float kRecoveryVisualScale = 0.10f; inline constexpr std::array kVehicleSpecs = {{ // 0: KD-1 Speeder (CAR) - Well-rounded standard hovercar (stat_speed=7) diff --git a/tests/test_render_geom.cpp b/tests/test_render_geom.cpp index 9ffc23c..63ce26d 100644 --- a/tests/test_render_geom.cpp +++ b/tests/test_render_geom.cpp @@ -4,6 +4,7 @@ #include "assets/sprites.hpp" #include "core/vfs.hpp" #include "render/world_geometry.hpp" +#include "sim/vehicle_defs.hpp" #include #include @@ -174,6 +175,12 @@ int main() { render::ModelGeometry mg = render::build_model_geometry(mesh, pal); CHECK(!mg.verts.empty()); CHECK(mg.indices.size() == mesh.triangles.size() * 3u); + if (std::string(k) == "RECOV0-0") { + Vec3 scaled = (mesh.bounds_max - mesh.bounds_min) * sim::kRecoveryVisualScale; + CHECK(scaled.x >= 0.5f && scaled.x <= 2.5f); + CHECK(scaled.y >= 0.5f && scaled.y <= 2.5f); + CHECK(scaled.z >= 0.5f && scaled.z <= 2.5f); + } } std::cout << "[PASS] All 9 Levels & Vehicle 3D Render Geometry validated\n";