Fixed Tm unstuck removal
This commit is contained in:
parent
9ecee5069d
commit
58461b4a2d
|
@ -1,5 +1,6 @@
|
|||
## Latest
|
||||
|
||||
* Fixed bug causing the TM's unstuck logic to incorrectly remove the vehicles in some situations.
|
||||
* Fixed the extra data in Directx textures, so we need to copy row by row on Windows to remove extra bytes on images
|
||||
* Restored gamma value to 2.2 instead of 2.4
|
||||
|
||||
|
|
|
@ -188,6 +188,7 @@ void ALSM::UpdateRegisteredActorsData(const bool hybrid_physics_mode, ALSM::Idle
|
|||
ActorId actor_id = vehicle->GetId();
|
||||
if (hero_actors.find(actor_id) == hero_actors.end()) {
|
||||
UpdateData(hybrid_physics_mode, max_idle_time, vehicle, hero_actor_present, physics_radius_square);
|
||||
UpdateIdleTime(max_idle_time, actor_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -264,9 +265,6 @@ void ALSM::UpdateData(const bool hybrid_physics_mode,
|
|||
|
||||
simulation_state.AddActor(actor_id, kinematic_state, attributes, tl_state);
|
||||
}
|
||||
|
||||
// Updating idle time when necessary.
|
||||
UpdateIdleTime(max_idle_time, actor_id);
|
||||
}
|
||||
|
||||
|
||||
|
@ -358,8 +356,9 @@ bool ALSM::IsVehicleStuck(const ActorId& actor_id) {
|
|||
if (idle_time.find(actor_id) != idle_time.end()) {
|
||||
double delta_idle_time = current_timestamp.elapsed_seconds - idle_time.at(actor_id);
|
||||
TrafficLightState tl_state = simulation_state.GetTLS(actor_id);
|
||||
if ((!tl_state.at_traffic_light && tl_state.tl_state != TLS::Red && delta_idle_time >= BLOCKED_TIME_THRESHOLD)
|
||||
|| (delta_idle_time >= RED_TL_BLOCKED_TIME_THRESHOLD)) {
|
||||
if ((delta_idle_time >= RED_TL_BLOCKED_TIME_THRESHOLD)
|
||||
|| (delta_idle_time >= BLOCKED_TIME_THRESHOLD && tl_state.tl_state != TLS::Red))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue