Oops i think i just found it, any verification? mob_ai.cpp
line 1060-1092
Code:
if (moving) {
if (AI_scan_door_open_timer->Check()) {
auto &door_list = entity_list.GetDoorsList();
for (auto itr : door_list) {
Doors *door = itr.second;
if (door->GetKeyItem())
continue;
if (door->GetLockpick())
continue;
if (door->IsDoorOpen())
continue;
float distance = DistanceSquared(this->m_Position, door->GetPosition());
float distance_scan_door_open = 20;
if (distance <= (distance_scan_door_open * distance_scan_door_open)) {
/**
* Make sure we're opening a door within height relevance and not platforms
* above or below
*/
if (std::abs(this->m_Position.z - door->GetPosition().z) > 10)
continue;
door->ForceOpen(this);
}
}
}
}