/apps/demos/scenery: fix ramp bug, increase gravity

This commit is contained in:
veclavtalica 2025-02-26 23:19:22 +03:00
parent 1c3973c6a2
commit 4bc1feb826

View File

@ -103,7 +103,7 @@ static void process_ground_mode(State *state) {
float const height = height_at(scn, (Vec2){scn->pos.x, scn->pos.z});
if (target.y > height + PLAYER_HEIGHT)
target.y = target.y - 0.4f;
target.y = target.y - 0.6f;
if (target.y < height + PLAYER_HEIGHT)
target.y = height + PLAYER_HEIGHT;
@ -181,7 +181,7 @@ static void draw_terrain(SceneIngame *scn) {
int32_t const rsi = (int32_t)TERRAIN_RADIUS * (int32_t)TERRAIN_RADIUS;
for (int32_t iy = -(int32_t)TERRAIN_RADIUS; iy <= (int32_t)TERRAIN_RADIUS - 1; ++iy) {
int32_t const dx = ceil_sqrt(rsi - (iy + (iy <= 0)) * (iy + (iy <= 0)));
for (int32_t ix = -dx; ix < dx; ++ix) {
for (int32_t ix = -dx; ix < dx - 1; ++ix) {
int32_t lx = ix + TERRAIN_RADIUS;
int32_t ly = iy + TERRAIN_RADIUS;