Skip to content

Commit

Permalink
Merge pull request #612 from Gh0stBlade/revert-607-revert-590-Relocat…
Browse files Browse the repository at this point in the history
…ePlanMarkers

[STREAM]: Update RelocatePlanMarkers
  • Loading branch information
FedericoMilesi authored Jan 31, 2024
2 parents d77a9d9 + ef69074 commit 56e953c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions KAIN2/Game/STREAM.C
Original file line number Diff line number Diff line change
Expand Up @@ -2201,8 +2201,8 @@ void RelocatePlanPool(struct PlanningNode* planPool, struct _SVector* offset) /
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;
Expand All @@ -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++;
}
}

Expand Down

0 comments on commit 56e953c

Please sign in to comment.