From 248ab652681fe417552dcc4efaf69aad92cfe083 Mon Sep 17 00:00:00 2001 From: Hipstercat Date: Tue, 11 Feb 2020 01:10:08 +0100 Subject: [PATCH] Right formula --- ShowGiantsForm/Form1.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShowGiantsForm/Form1.cs b/ShowGiantsForm/Form1.cs index afb44ca..2bdb218 100644 --- a/ShowGiantsForm/Form1.cs +++ b/ShowGiantsForm/Form1.cs @@ -65,7 +65,7 @@ namespace ShowGiantsForm float damage = readFloatPointer(0x161D00, 0x278); float currentHp = maxHp - damage; - float speed = Math.Abs(speedx) + Math.Abs(speedy) + Math.Abs(speedz); + double speed = Math.Sqrt(Math.Pow(speedx, 2) + Math.Pow(speedy, 2) + Math.Pow(speedz, 2)); SpeedLbl.Text = "Speed: " + speed; hpLbl.Text = "HP: " + currentHp; } catch (Exception ex)