From 9fc17a4bcf9c5ff0816d0d36d09b90d1bed17649 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 14 Dec 2022 11:32:38 +0100 Subject: [PATCH] - fixed velocity handling in a few enemy swimChase functions. The one for the gill beast was particularly bad. --- source/games/blood/src/aibeast.cpp | 4 ++-- source/games/blood/src/aicaleb.cpp | 4 ++-- source/games/blood/src/aigilbst.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/games/blood/src/aibeast.cpp b/source/games/blood/src/aibeast.cpp index 94f23183e..5bbaf6a92 100644 --- a/source/games/blood/src/aibeast.cpp +++ b/source/games/blood/src/aibeast.cpp @@ -454,7 +454,7 @@ static void sub_62AE0(DBloodActor* actor) }); double dz = target->spr.pos.Z - actor->spr.pos.Z; - actor->vel.Z -= dz / 256; + actor->vel.Z = -dz / 256; } static void sub_62D7C(DBloodActor* actor) @@ -484,7 +484,7 @@ static void sub_62D7C(DBloodActor* actor) }); double dz = target->spr.pos.Z - actor->spr.pos.Z; - actor->vel.Z += dz / 32; + actor->vel.Z = dz / 32; } END_BLD_NS diff --git a/source/games/blood/src/aicaleb.cpp b/source/games/blood/src/aicaleb.cpp index 4f883b94d..f9c81054f 100644 --- a/source/games/blood/src/aicaleb.cpp +++ b/source/games/blood/src/aicaleb.cpp @@ -322,7 +322,7 @@ static void sub_65F44(DBloodActor* actor) }); double dz = target->spr.pos.Z - actor->spr.pos.Z; - actor->vel.Z -= dz / 256; + actor->vel.Z = -dz / 256; } static void sub_661E0(DBloodActor* actor) @@ -350,7 +350,7 @@ static void sub_661E0(DBloodActor* actor) }); double dz = target->spr.pos.Z - actor->spr.pos.Z; - actor->vel.Z += dz / 32; + actor->vel.Z = dz / 32; } END_BLD_NS diff --git a/source/games/blood/src/aigilbst.cpp b/source/games/blood/src/aigilbst.cpp index 2d7f6ad10..cef9bab42 100644 --- a/source/games/blood/src/aigilbst.cpp +++ b/source/games/blood/src/aigilbst.cpp @@ -309,7 +309,7 @@ static void sub_6CD74(DBloodActor* actor) t1 += nAccel; }); - actor->vel.Z -= target->spr.pos.Z - actor->spr.pos.Z / 256.; + actor->vel.Z = -(target->spr.pos.Z - actor->spr.pos.Z) / 256.; } static void sub_6D03C(DBloodActor* actor) @@ -336,7 +336,7 @@ static void sub_6D03C(DBloodActor* actor) t1 += nAccel * 0.5; }); - actor->vel.Z += target->spr.pos.Z - actor->spr.pos.Z / 32.; + actor->vel.Z = (target->spr.pos.Z - actor->spr.pos.Z) / 32.; } END_BLD_NS