ladder: climb up and down smoothly when grabbing ladder

I don't know the reason for not having this, but now we mimic normal wall climbing behaviour which is much smoother and leads to faster game play.
master
Maikel de Vries 2018-06-23 10:03:19 +02:00
parent b11a25db4b
commit 5bb9fa228a
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,6 @@ public func FxIntClimbControlStart(object target, effect fx, int tmp, object lad
fx.ladder = ladder;
SetXDir(0);
SetYDir(0);
SetComDir(COMD_Stop);
// Start on an even segment.
fx.odd = 0;
// Correctly initalize the relative y-position of the clonk to the segment.
@ -345,6 +344,7 @@ public func FxIntClimbControlStop(object target, effect fx, int reason, bool tmp
public func FxIntClimbControlControl(object target, effect fx, int ctrl, int x, int y, int strength, bool repeat, int status)
{
Log("ladder ctrl %v, status %v", ctrl, status);
// Only handle movement controls.
if (ctrl != CON_Up && ctrl != CON_Down && ctrl != CON_Right && ctrl != CON_Left)
return false;