View Single Post
  #1  
Old 04-01-2010, 01:26 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
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