Removed if clauses

It was functionally equivalent to the solution proposed in #1072
This commit is contained in:
Ghoulboy authored and gnembon committed 2023-03-08 21:25:19 +01:00
1 parent cc24f79d47
commit c2ef75df6d
1 file changed
+3 -8
@@ -237,14 +237,9 @@ public class EntityPlayerActionPack
}
}
}
if (forward != 0.0F)
{
player.zza = forward*(sneaking?0.3F:1.0F);
}
if (strafing != 0.0F)
{
player.xxa = strafing*(sneaking?0.3F:1.0F);
}
float vel = sneaking?0.3F:1.0F;
player.zza = forward*vel;
player.xxa = strafing*vel;
}
static HitResult getTarget(ServerPlayer player)