Skip to content

Commit 1bcbd9b

Browse files
committed
Reduce search range for skinner to hunter distance
1 parent 26afec2 commit 1bcbd9b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libs/s25main/figures/nofSkinner.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,12 @@ void nofSkinner::TryStartSkinning()
157157
HandleStateWaiting1();
158158
else
159159
{
160+
const int SQUARE_SIZE = 19;
160161
std::vector<noAnimal*> available_animals;
161162
Position curPos;
162-
for(curPos.y = pos.y - MAX_SKINNING_DISTANCE; curPos.y <= pos.y + MAX_SKINNING_DISTANCE; ++curPos.y)
163+
for(curPos.y = pos.y - SQUARE_SIZE; curPos.y <= pos.y + SQUARE_SIZE; ++curPos.y)
163164
{
164-
for(curPos.x = pos.x - MAX_SKINNING_DISTANCE; curPos.x <= pos.x + MAX_SKINNING_DISTANCE; ++curPos.x)
165+
for(curPos.x = pos.x - SQUARE_SIZE; curPos.x <= pos.x + SQUARE_SIZE; ++curPos.x)
165166
{
166167
MapPoint curMapPos = world->MakeMapPoint(curPos);
167168
for(auto& figure : world->GetFigures(curMapPos))

0 commit comments

Comments
 (0)