Skip to content

Commit

Permalink
Reduce the leisure buildings search distance
Browse files Browse the repository at this point in the history
  • Loading branch information
dymanoid committed Jun 26, 2018
1 parent fa3e8ec commit bdc33fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/RealTime/CustomAI/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ internal static class Constants
{
public const int ShoppingGoodsAmount = 100;

public const float LocalSearchDistance = 500f;
public const float LocalSearchDistance = 270f * 2;
public const float LeisureSearchDistance = 270f * 3;
public const float FullSearchDistance = 270f * 64f / 2f;

public const uint AbandonTourChance = 25;
Expand Down
2 changes: 1 addition & 1 deletion src/RealTime/CustomResidentAI/RealTimeResidentAI.Visit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ private ushort MoveToLeisure(TAI instance, uint citizenId, ref TCitizen citizen,
{
ushort leisureBuilding = BuildingMgr.FindActiveBuilding(
buildingId,
FullSearchDistance,
LeisureSearchDistance,
ItemClass.Service.Commercial,
ItemClass.SubService.CommercialLeisure);

Expand Down

1 comment on commit bdc33fb

@dymanoid
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes #4 by allowing citizens to search for leisure buildings nearby only

Please sign in to comment.