From 322480fdb86f329dc05ae1683c1f15ca48fa709d Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 1 Dec 2024 16:46:22 +0100 Subject: close #38 --- src/world.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/world.c') diff --git a/src/world.c b/src/world.c index 84a4c3c..7ff0e19 100644 --- a/src/world.c +++ b/src/world.c @@ -1159,6 +1159,7 @@ static void world_update_employee_happiness(world* world, employee* emp) { world_report_event(world, error_msg, EVENT_TYPE_EMPLOYEE_QUIT, get_world_location_by_id(world, emp->original_location_id)); end_contract_with_employee(world, emp); + world->simulation_speed = 0; } } @@ -1240,6 +1241,7 @@ static void end_contract_with_random_employee(world* world) snprintf(error_msg, MAX_EVENT_MESSAGE_LENGTH, "%s quit their job. Their routes need a new assignee!", emp->name); world_report_event(world, error_msg, EVENT_TYPE_EMPLOYEE_QUIT, get_world_location_by_id(world, emp->original_location_id)); end_contract_with_employee(world, emp); + world->simulation_speed = 0; } static void end_contract_with_random_job(world* world) @@ -1464,7 +1466,7 @@ static void world_age_employee(world* world) snprintf(error_msg, MAX_EVENT_MESSAGE_LENGTH, "%s retired at age %d. Their routes need a new assignee!", em->name, RETIREMENT_AGE); world_report_event(world, error_msg, EVENT_TYPE_EMPLOYEE_QUIT, location); end_contract_with_employee(world, em); - + world->simulation_speed = 0; x--; } } -- cgit v1.2.3-70-g09d2