Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 04-01-2010, 01:26 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default COMMITTED: Pet Behavior

Small change to make pet behavior more realistic.

Code:
Index: MobAI.cpp
===================================================================
--- MobAI.cpp	(revision 1333)
+++ MobAI.cpp	(working copy)
@@ -1381,16 +1381,15 @@
 						//	printf("Pet start pos: (%f, %f, %f)\n", GetX(), GetY(), GetZ());
 						
 						float dist = DistNoRoot(*owner);
-						if (dist >= 100) 
+						if (dist >= 400) 
 						{
 							float speed = GetWalkspeed();
-							if (dist >= 225)
+							if (dist >= 5625)
 								speed = GetRunspeed();
 							CalculateNewPosition2(owner->GetX(), owner->GetY(), owner->GetZ(), speed);
 						}
 						else
 						{
-							SetHeading(owner->GetHeading());
 							if(moved)
 							{
 								moved=false;
1. Pets will stand 20 feet from owner instead of 10.
2. Pets will walk between 20 and 75 feet.
3. Pets will run after 75 feet.
4. Pets will stay facing direction of movement. This will lead up to a future fix where the pet will face nearest spawn within range as on live.
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 09:45 AM.


 

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