mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Fix typo
This commit is contained in:
parent
4a64e73648
commit
e4098c458f
1 changed files with 3 additions and 3 deletions
|
@ -211,9 +211,9 @@ void TargetNearestEntity(ItemInfo& item, const std::vector<GAME_OBJECT_ID>& keyO
|
||||||
auto& creature = *GetCreatureInfo(&item);
|
auto& creature = *GetCreatureInfo(&item);
|
||||||
|
|
||||||
float closestDistSqr = INFINITY;
|
float closestDistSqr = INFINITY;
|
||||||
for (auto& creature : ActiveCreatures)
|
for (auto& target : ActiveCreatures)
|
||||||
{
|
{
|
||||||
auto& targetItem = g_Level.Items[creature->ItemNumber];
|
auto& targetItem = g_Level.Items[target->ItemNumber];
|
||||||
if (targetItem.Index == item.Index)
|
if (targetItem.Index == item.Index)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ void TargetNearestEntity(ItemInfo& item, const std::vector<GAME_OBJECT_ID>& keyO
|
||||||
float distSqr = Vector3i::DistanceSquared(item.Pose.Position, targetItem.Pose.Position);
|
float distSqr = Vector3i::DistanceSquared(item.Pose.Position, targetItem.Pose.Position);
|
||||||
if (distSqr < closestDistSqr)
|
if (distSqr < closestDistSqr)
|
||||||
{
|
{
|
||||||
creature->Enemy = &targetItem;
|
creature.Enemy = &targetItem;
|
||||||
closestDistSqr = distSqr;
|
closestDistSqr = distSqr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue