Compare commits

...

2 Commits

Author SHA1 Message Date
En Yi bc0f7617d4 Slow down water filling rate 2025-04-13 20:30:36 +08:00
En Yi 7a4cf55c06 Allow only binary short hop on crates 2025-04-13 20:30:28 +08:00
2 changed files with 6 additions and 4 deletions

View File

@ -1710,13 +1710,15 @@ void hitbox_update_system(Scene_t* scene)
{ {
if (p_ent->position.y + p_bbox->size.y <= p_other_ent->position.y) if (p_ent->position.y + p_bbox->size.y <= p_other_ent->position.y)
{ {
CJump_t * p_cjump = get_component(p_ent, CJUMP_COMP_T);
// Don't allow the usual jump interaction with crate jump
p_cjump->short_hop = true;
p_cjump->jumped = false;
p_ctransform->velocity.y = -400; p_ctransform->velocity.y = -400;
if (p_pstate->jump_pressed) if (p_pstate->jump_pressed)
{ {
p_ctransform->velocity.y = -600; p_ctransform->velocity.y = -600;
CJump_t * p_cjump = get_component(p_ent, CJUMP_COMP_T);
p_cjump->short_hop = false;
p_cjump->jumped = true;
} }
if (p_ent->m_tag == PLAYER_ENT_TAG) if (p_ent->m_tag == PLAYER_ENT_TAG)
{ {

View File

@ -289,7 +289,7 @@ void update_water_runner_system(Scene_t* scene)
break; break;
case SCANLINE_FILL: case SCANLINE_FILL:
{ {
const float FILL_RATE = 1.0f/24; const float FILL_RATE = 1.0f/20;
p_crunner->fractional += scene->delta_time; p_crunner->fractional += scene->delta_time;
if (p_crunner->fractional < FILL_RATE) break; if (p_crunner->fractional < FILL_RATE) break;