Loading

demolish

  1. # HG changeset patch
  2. # Parent cb1d86ca32223069b63734a860cc481d993428be
  3.  
  4. diff --git a/src/person.cpp b/src/person.cpp
  5. --- a/src/person.cpp
  6. +++ b/src/person.cpp
  7. @@ -679,6 +679,18 @@ void Guest::DecideMoveDirection()
  8.             }
  9.         }
  10.  
  11. +       if (this->activity == GA_GO_HOME && this->happiness < 15) {
  12. +           //! \todo Watch out for guards (and user watching?)
  13. +           /* Really bad mood. */
  14. +           uint16 path_instance_data = v->GetInstanceData();
  15. +           if (!GetPathDemolished(path_instance_data) && IsPathDecorationVisible(path_instance_data) &&
  16. +                   GetPathDecoration(path_instance_data) != PDEC_NONE) {
  17. +               path_instance_data = SetPathDemolished(path_instance_data, true);
  18. +               v->SetInstanceData(path_instance_data);
  19. +               this->happiness++; // Yeah!
  20. +           }
  21. +       }
  22. +
  23.         /* Find feasible exits and shops. */
  24.         bool seen_wanted_ride;
  25.         exits = GetExitDirections(v, start_edge, &seen_wanted_ride, &queue_path);

Comments