fix: correct velocity clamping and hitbox loading

Preserve sign when clamping velocity; negative velocities now clamp to zero instead of flipping direction. Support loading hitbox definitions from JSON arrays and objects. Tune pig entity movement, spawn height, and wander probabilities.
This commit is contained in:
2026-08-02 16:14:56 +08:00
parent a54858e4c6
commit 9bb1882d92
5 changed files with 26 additions and 16 deletions

View File

@@ -5,8 +5,8 @@
#include "Cubed/tools/cubed_random.hpp"
namespace {
constexpr double DIRECTION_PROBABILITY = 0.1;
constexpr double MOVE_PROBABILITY = 0.1;
constexpr double DIRECTION_PROBABILITY = 0.01;
constexpr double MOVE_PROBABILITY = 0.01;
} // namespace
namespace Cubed {