Skip to content

Commit

Permalink
simplified delta subtraction
Browse files Browse the repository at this point in the history
  • Loading branch information
smallmodel committed Oct 23, 2023
1 parent 4e4af59 commit ddb6236
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions code/fgame/navigate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3042,10 +3042,7 @@ int PathSearch::NearestNodeSetup(vec3_t pos, MapCell *cell, int *nodes, vec3_t *
continue;
}

delta[0] = node->origin[0] - pos[0];
delta[1] = node->origin[1] - pos[1];
delta[2] = node->origin[2] - pos[2];

VectorSubtract(node->origin, pos, delta);
VectorCopy(delta, deltas[i]);

dist = VectorLengthSquared(delta);
Expand Down

0 comments on commit ddb6236

Please sign in to comment.