mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Tweak the running visuals
This commit is contained in:
parent
c0fe997a39
commit
fc09212d43
|
@ -501,50 +501,52 @@ anim.front_foot.frames.Add(AnimKeyframe(0.8, 8, 0, 0))
|
|||
anim.front_foot.frames.Add(AnimKeyframe(1.0,-10,-4, 0.2))
|
||||
container.animations.Add(anim)
|
||||
|
||||
# the run_left animation is taken directly from run_right, only the x and rotate values are flipped,
|
||||
# and each string is run backwards, to account for how it's played in game.
|
||||
anim = Animation("run_left")
|
||||
anim.body.frames.Add(AnimKeyframe(0.0, 0, -2, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.0, 0, -1, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.2, 0, 0, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.4, 0, 0, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.6, 0, -2, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.4, 0, -1, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.6, 0, 0, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.8, 0, 0, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(1.0, 0, -2, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(1.0, 0, -1, 0))
|
||||
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.0, 18, -11, -0.27))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.0, 18, -8, -0.27))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.2, 6, 0, 0))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.4, -7, 0, 0))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.6, -13, -4.5, 0.05))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.8, 0, -11, -0.2))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(1.0, 18, -11, -0.27))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.8, 0, -8, -0.2))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(1.0, 18, -8, -0.27))
|
||||
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.0, -13, -4.5, 0.05))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.2, -14, -7, 0.1))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.4, 11, -13, -0.3))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.6, 18, -11, -0.27))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.8, 3, 0, -0.02))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(1.0, -13, -4.5, 0.05))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.0, -11, -2.5, 0.05))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.2, -14, -5, 0.1))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.4, 11, -8, -0.3))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.6, 18, -8, -0.27))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.8, 3, 0, 0))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(1.0, -11, -2.5, 0.05))
|
||||
container.animations.Add(anim)
|
||||
|
||||
anim = Animation("run_right")
|
||||
anim.body.frames.Add(AnimKeyframe(0.0, 0, -2, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.0, 0, -1, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.2, 0, 0, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.4, 0, -2, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.6, 0, 0, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.4, 0, 0, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.6, 0, -1, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(0.8, 0, 0, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(1.0, 0, -2, 0))
|
||||
anim.body.frames.Add(AnimKeyframe(1.0, 0, -1, 0))
|
||||
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.0, -18, -11, 0.27))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.2, 0, -11, 0.2))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.0, -18, -8, 0.27))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.2, 0, -8, 0.2))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.4, 13, -4.5, -0.05))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.6, 7, 0, 0))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(0.8, -6, 0, 0))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(1.0, -18, -11, 0.27))
|
||||
anim.back_foot.frames.Add(AnimKeyframe(1.0, -18, -8, 0.27))
|
||||
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.0, 13, -4.5, -0.05))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.2, -3, 0, 0.02))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.4, -18, -11, 0.27))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.6, -11, -13, 0.3))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.8, 14, -7, -0.1))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(1.0, 13, -4.5, -0.05))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.0, 11, -2.5, -0.05))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.2, -3, 0, 0))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.4, -18, -8, 0.27))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.6, -11, -8, 0.3))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(0.8, 14, -5, -0.1))
|
||||
anim.front_foot.frames.Add(AnimKeyframe(1.0, 11, -2.5, -0.05))
|
||||
container.animations.Add(anim)
|
||||
|
||||
anim = Animation("hammer_swing")
|
||||
|
|
|
@ -420,7 +420,7 @@ void CPlayers::RenderPlayer(
|
|||
|
||||
// evaluate animation
|
||||
float WalkTime = fmod(Position.x, 100.0f) / 100.0f;
|
||||
float RunTime = fmod(Position.x, 250.0f) / 250.0f;
|
||||
float RunTime = fmod(Position.x, 200.0f) / 200.0f;
|
||||
|
||||
// Don't do a moon walk outside the left border
|
||||
if(WalkTime < 0)
|
||||
|
|
Loading…
Reference in a new issue