Skip to content

Commit

Permalink
Fix #209, the homeless residents should not be immediately deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
dymanoid committed May 28, 2019
1 parent 3d1c1e7 commit e7360b1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/RealTime/CustomAI/RealTimeResidentAI.Home.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ private void DoScheduledHome(ref CitizenSchedule schedule, TAI instance, uint ci
ushort homeBuilding = CitizenProxy.GetHomeBuilding(ref citizen);
if (homeBuilding == 0)
{
Log.Debug(LogCategory.State, $"WARNING: {GetCitizenDesc(citizenId, ref citizen)} is in corrupt state: want to go home with no home building. Releasing the poor citizen.");
CitizenMgr.ReleaseCitizen(citizenId);
schedule = default;
Log.Debug(LogCategory.State, $"{GetCitizenDesc(citizenId, ref citizen)} is currently homeless. Cannot move home, waiting for the next opportunity");
return;
}

Expand Down

0 comments on commit e7360b1

Please sign in to comment.