[Ohrrpgce] SVN: teeemcee/7829 Fix jump animations, properly this time.
subversion at HamsterRepublic.com
subversion at HamsterRepublic.com
Fri Mar 18 08:53:08 PDT 2016
teeemcee
2016-03-18 08:53:08 -0700 (Fri, 18 Mar 2016)
1109
Fix jump animations, properly this time.
r3373, which was major bmod code cleanup, introduced a bug where when a hero
jumps, they jump towards the right instead of to the left. It turns out that
anim_relmove, which is only used for jumping, contained two major bugs, and
James fixed one of them in r3373, causing the behaviour to change.
In r4278 I fixed the jump problem by simply reverting the bugfix in r3373,
clearly not understanding the code. The r4278 change was:
--- a/bmod.bas
+++ b/bmod.bas
@@ -445,7 +445,7 @@ SUB battle_attack_anim_playback (BYREF attack AS AttackData, BYREF bat AS Battle
movestep.x = popw
movestep.y = popw
with bslot(ww)
- if movestep.x <> 0 then .xspeed = movedist.x / movestep.x
+ if movedist.y <> 0 then .xspeed = movedist.x / movestep.x
if movestep.y <> 0 then .yspeed = movedist.y / movestep.y
.xmov = movedist.x
.ymov = movedist.y
The other bug was that the wrong thing was assigned to .xmov/.ymov.
As a result of this fix I had to change the jump animation, so I made it
faster. I always thought it looked bad because it was too slow
---
U wip/bmod.rbas
U wip/bmodsubs.bas
More information about the Ohrrpgce
mailing list