Skip to content

Commit

Permalink
Revert "Revert "[STREAM]: Update RelocatePlanMarkers""
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoMilesi authored Jan 30, 2024
1 parent 4d8d4f7 commit ef69074
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)//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;
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 ef69074

Please sign in to comment.