diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-11-28 20:18:57 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-11-28 20:18:57 +0100 |
| commit | ba45aec809a5ecc4955848ddf94d959e89db3905 (patch) | |
| tree | b07d5d623d86860c7f9546993485d7c10a2a1b98 /src/world.c | |
| parent | 3606c84655eb2bfac76933bc15b68e954e9b3034 (diff) | |
close #2, close #3
Diffstat (limited to 'src/world.c')
| -rw-r--r-- | src/world.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/world.c b/src/world.c index 4665a86..8ceb5b3 100644 --- a/src/world.c +++ b/src/world.c @@ -725,7 +725,9 @@ static void world_assign_new_job_offers(world* world) total_dist += distance_between_location(source, dest);
}
new_offer.total_distance = total_dist;
- new_offer.reward = (u32)(new_offer.total_distance * 2.1);
+ new_offer.reward = (u32)((new_offer.total_distance * 2.1) *
+ (1 + (0.2f * (location->score))) *
+ (1 + (get_random_number(0, 10) / 100.0f)));
// lets assume most experienced drivers drive at 90km/h
double min_duration_hours = (new_offer.total_distance/90.0);
|
