From ef69074322d0ff6db5ec8d8881d66141bd071c83 Mon Sep 17 00:00:00 2001 From: Federico Milesi Date: Tue, 30 Jan 2024 19:02:18 -0300 Subject: [PATCH] Revert "Revert "[STREAM]: Update RelocatePlanMarkers"" --- KAIN2/Game/STREAM.C | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/KAIN2/Game/STREAM.C b/KAIN2/Game/STREAM.C index 418d75a69..a6da2c8d3 100644 --- a/KAIN2/Game/STREAM.C +++ b/KAIN2/Game/STREAM.C @@ -2201,8 +2201,8 @@ void RelocatePlanPool(struct PlanningNode* planPool, struct _SVector* offset)//M poolManagementData->playerPosAtLastPlanMkrUpdate.z += oz; } -void RelocatePlanMarkers(struct _PlanMkr* planMkrList, int numPlanMkrs, struct _SVector* offset) -{ +void RelocatePlanMarkers(struct _PlanMkr* planMkrList, int numPlanMkrs, struct _SVector* offset) // Matching - 100% +{ int i; short ox; short oy; @@ -2212,11 +2212,12 @@ void RelocatePlanMarkers(struct _PlanMkr* planMkrList, int numPlanMkrs, struct _ oy = offset->y; oz = offset->z; - for (i = 0; i < numPlanMkrs; i++) + for (i = numPlanMkrs; i != 0; i--) { - planMkrList[i].pos.x += ox; - planMkrList[i].pos.y += oy; - planMkrList[i].pos.z += oz; + planMkrList->pos.x += ox; + planMkrList->pos.y += oy; + planMkrList->pos.z += oz; + planMkrList++; } }