diff --git a/planet/Objects.ocd/Clonk.ocd/Animations.ocd/Script.c b/planet/Objects.ocd/Clonk.ocd/Animations.ocd/Script.c index 44acdf1b9..bb84ae14c 100644 --- a/planet/Objects.ocd/Clonk.ocd/Animations.ocd/Script.c +++ b/planet/Objects.ocd/Clonk.ocd/Animations.ocd/Script.c @@ -98,6 +98,12 @@ func FxIntTurnTimer(pTarget, effect, iTime) return; } +public func UpdateTurnRotation() +{ + var iEff = GetEffect("IntTurn", this); + iEff.turn_type = -1; +} + public func GetTurnPhase() { var iEff = GetEffect("IntTurn", this); diff --git a/planet/Objects.ocd/Items.ocd/Tools.ocd/GrappleBow.ocd/Hook.ocd/Script.c b/planet/Objects.ocd/Items.ocd/Tools.ocd/GrappleBow.ocd/Hook.ocd/Script.c index 5c2908e8b..b84d84539 100644 --- a/planet/Objects.ocd/Items.ocd/Tools.ocd/GrappleBow.ocd/Hook.ocd/Script.c +++ b/planet/Objects.ocd/Items.ocd/Tools.ocd/GrappleBow.ocd/Hook.ocd/Script.c @@ -175,10 +175,30 @@ public func FxIntGrappleControlControl(object target, fxnum, ctrl, x,y,strength, if(ctrl == CON_Right) { fxnum.mv_right = !release; + if(release) + { + if(fxnum.lastkey == CON_Right) + { + target->SetDir(0); + target->UpdateTurnRotation(); + } + fxnum.lastkey = CON_Right; + fxnum.keyTimer = 10; + } } if(ctrl == CON_Left) { fxnum.mv_left = !release; + if(release) + { + if(fxnum.lastkey == CON_Left) + { + target->SetDir(1); + target->UpdateTurnRotation(); + } + fxnum.lastkey = CON_Left; + fxnum.keyTimer = 10; + } } if(ctrl == CON_Up) { @@ -209,6 +229,12 @@ public func FxIntGrappleControlTimer(object target, fxnum, int time) if (target->Contained()) return -1; + if(fxnum.keyTimer) + { + fxnum.keyTimer--; + if(fxnum.keyTimer == 0) + fxnum.lastkey = 0; + } // Movement. if (fxnum.mv_up) if (rope)