From 8921360ecc470f67fa82b9c4a29c15ed7ca586d6 Mon Sep 17 00:00:00 2001 From: Marioiscool246 Date: Tue, 8 Aug 2023 08:44:06 -0400 Subject: [PATCH] Fixed incorrect Entity push velocity direction (#42) Co-authored-by: Marioiscool246 --- source/world/entity/Entity.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/world/entity/Entity.cpp b/source/world/entity/Entity.cpp index a7cddf3..4eba4d3 100644 --- a/source/world/entity/Entity.cpp +++ b/source/world/entity/Entity.cpp @@ -863,9 +863,10 @@ void Entity::push(Entity* bud) x2 = 1.0f; float x3 = 1.0f - this->field_B0; float x4 = x3 * diffX / x1 * x2 * 0.05f; + float x5 = x3 * diffZ / x1 * x2 * 0.05f; - push(-x4, 0.0f, -x4); - bud->push(x4, 0.0f, x4); + push(-x4, 0.0f, -x5); + bud->push(x4, 0.0f, x5); } void Entity::push(float x, float y, float z)