Fix oversized repair drone (RECOV0-0) model scale
This commit is contained in:
1 parent
fc76e447fe
commit
3b4fbe76af
3 files changed
+10
-1
No files matched your search
@@ -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;
|
||||
|
||||
@@ -33,6 +33,7 @@ struct VehicleSpec {
|
||||
};
|
||||
|
||||
inline constexpr float kGlobalSpeedGaugeMax = 33.5f;
|
||||
inline constexpr float kRecoveryVisualScale = 0.10f;
|
||||
|
||||
inline constexpr std::array<VehicleSpec, 6> kVehicleSpecs = {{
|
||||
// 0: KD-1 Speeder (CAR) - Well-rounded standard hovercar (stat_speed=7)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "assets/sprites.hpp"
|
||||
#include "core/vfs.hpp"
|
||||
#include "render/world_geometry.hpp"
|
||||
#include "sim/vehicle_defs.hpp"
|
||||
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user