Fix downward dash not damaging enemies #26
Reference in New Issue
Block a user
Delete Branch "fix/downward-dash-damage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes #15 — the downward dash (double-tap down) did not hurt enemies and left the player vulnerable immediately after.
Root cause: The stomp check in
level.cwas inside the!(player->flags & ENTITY_INVINCIBLE)guard. Since the downward dash grants invincibility, the entire collision block was skipped — no stomp damage could ever be dealt during a dash.Changes:
level.c: Move invincibility guard to only protect against taking damage, not dealing it. Stomping now works regardless of invincibility state.player.c/player.h: Extend dash invincibility byPLAYER_DASH_INV_GRACE(0.15s) past the dash duration, giving a brief safety window after landing.aa2550cc59to66a7b9e7e6