From 5fb7c2a916b00df9033be04fe1b7ef56390e6780 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 28 Jul 2022 09:26:28 -0400 Subject: [PATCH] Fixed #7239 --- core/src/mindustry/entities/comp/LegsComp.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/entities/comp/LegsComp.java b/core/src/mindustry/entities/comp/LegsComp.java index a37b615e61..68a67b6927 100644 --- a/core/src/mindustry/entities/comp/LegsComp.java +++ b/core/src/mindustry/entities/comp/LegsComp.java @@ -202,12 +202,10 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc{ //leg destination Vec2 legDest = Tmp.v1.trns(dstRot, legLength * type.legLengthScl).add(baseOffset).add(moveOffset); //join destination - Vec2 jointDest = Tmp.v2;//.trns(rot2, legLength / 2f + type.legBaseOffset).add(moveOffset); + Vec2 jointDest = Tmp.v2; InverseKinematics.solve(legLength/2f, legLength/2f, Tmp.v6.set(l.base).sub(baseOffset), side, jointDest); jointDest.add(baseOffset); Tmp.v6.set(baseOffset).lerp(l.base, 0.5f); - //lerp between kinematic and linear? - //jointDest.lerp(Tmp.v6.set(baseOffset).lerp(l.base, 0.5f), 1f - type.kinematicScl); if(move){ float moveFract = stageF % 1f; @@ -224,7 +222,7 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc{ } //when at least 1 leg is touching land, it can't drown - if(deeps != legs.length){ + if(deeps != legs.length || !floorOn().isDeep()){ lastDeepFloor = null; } }