diff options
Diffstat (limited to 'src/world.c')
| -rw-r--r-- | src/world.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/world.c b/src/world.c index ec251de..1750608 100644 --- a/src/world.c +++ b/src/world.c @@ -1188,6 +1188,7 @@ static void world_start_random_events(world* world) bool run_event = change_of_random_event >= (get_random_number(0, 100)/100.0f);
+ //world_report_event(world, "Random event", );
(void)run_event; // TODO start event.
}
}
@@ -1219,11 +1220,11 @@ static void end_contract_with_employee(world* world, employee* emp) // Remove active job
active_job* curr_job = get_active_job_by_id(world, emp->active_job_id);
- array_remove_by(&world->active_jobs, curr_job);
+ if (curr_job) array_remove_by(&world->active_jobs, curr_job);
// Remove employee from original location
world_location* orig_loc = get_world_location_by_id(world, emp->original_location_id);
- array_remove_by(&orig_loc->employees, &emp);
+ if (orig_loc) array_remove_by(&orig_loc->employees, &emp);
// Remove employee from current location
world_location* curr_loc = get_world_location_by_id(world, emp->current_location_id);
|
