mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-24 09:52:20 -05:00
Fix jump bug
This commit is contained in:
parent
a426d0678b
commit
57bc76e577
@ -267,7 +267,12 @@
|
||||
#endif
|
||||
|
||||
#define SFG_PLAYER_JUMP_OFFSET_PER_FRAME \
|
||||
((SFG_PLAYER_JUMP_SPEED * RCL_UNITS_PER_SQUARE) / SFG_FPS)
|
||||
(((SFG_PLAYER_JUMP_SPEED * RCL_UNITS_PER_SQUARE) / SFG_FPS) \
|
||||
- SFG_GRAVITY_SPEED_INCREASE_PER_FRAME / 2)
|
||||
/* ^ This substraction corrects the initial veloc. so that the numeric curve
|
||||
copies the analytical (smooth) curve. Without it the numeric curve goes
|
||||
ABOVE and makes player jump higher with lower FPS. To make sense of this
|
||||
try to solve the differential equation and plot it. */
|
||||
|
||||
#if SFG_PLAYER_JUMP_OFFSET_PER_FRAME == 0
|
||||
#define SFG_PLAYER_JUMP_OFFSET_PER_FRAME 1
|
||||
|
Loading…
Reference in New Issue
Block a user