Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-19-2018, 03:58 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default NPC Door Opening Modification

Hey all,


The new change where NPCs open doors is great! But i am looking to modify/change it to submit/post for others who want the change whatever route this/i/we go with it.

The door opening needs a few more paramaters and seeing them placed in NPC_types would be great. As in, dooropen_prox, dooropen 0/1. Alot of zones that have pathways near doors or NPCs that path by doors and not THROUGH them, hit that proximity range and doors just open for no need. It would be nice to have the default option of dooropen 1 in npc_types so they by default all open doors but able to turn it off so the npcs that walk by a door wont open it. Or/And adjust the proximity. Having dooropen column is also flexible for style if people want classic or new choice.

Ive been looking through the code trying to find the proximity setting for this. Any pointers to the location of it? I can start working on it if i can find it lol.
"NPC's now open doors within proximity given the door doesn't have locked requirements"

Thank you
__________________
Reply With Quote
  #2  
Old 06-19-2018, 04:03 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
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
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:48 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3