Skip to content

Commit

Permalink
Fixed bug causing dynamic traffic messages to appear in non-dynamic zone
Browse files Browse the repository at this point in the history
luciensadi committed Jan 26, 2025
1 parent 54200ce commit e16833d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/traffic_messages.cpp
Original file line number Diff line number Diff line change
@@ -490,8 +490,10 @@ void regenerate_traffic_msgs() {
queue.push_back(str_dup(messages[msg_idx]));

// Add dynamic traffic messages to the queue.
for (int dyn_idx = 0; dyn_idx < (int) (qty * 2); dyn_idx++)
queue.push_back(generate_dynamic_traffic_message__returns_new());
if (which != TRAFFIC_MESSAGES_DEPRESSING) {
for (int dyn_idx = 0; dyn_idx < (int) (qty * 2); dyn_idx++)
queue.push_back(generate_dynamic_traffic_message__returns_new());
}

// Shuffle it.
std::random_device rd;

0 comments on commit e16833d

Please sign in to comment.