View Single Post
  #2  
Old 06-19-2018, 04:03 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 253
Default

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);
				}
			}
		}
	}
__________________
Reply With Quote