Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tacoma Commune: fix caravans splitting #50702

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/mission_companion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,10 +760,11 @@ void talk_function::caravan_depart( npc &p, const std::string &dest, const std::
popup( _( "The caravan departs with an estimated total travel time of %d hours…" ),
to_hours<int>( time ) );

//Adds a 10% error in estimated travel time
time_point arrive_at = calendar::turn + time * rng_float( -1.1, 1.1 );
for( auto &elem : npc_list ) {
if( elem->companion_mission_time == calendar::before_time_starts ) {
//Adds a 10% error in estimated travel time
elem->companion_mission_time = calendar::turn + time * rng_float( -1.1, 1.1 );
elem->companion_mission_time = arrive_at;
}
}
}
Expand Down