summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index d4db10d09..745bae5e2 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -964,8 +964,11 @@ static int pet_ai_sub_hard(struct pet_data *pd,unsigned int tick)
}
//Return speed to normal.
- if (pd->speed != sd->petDB->speed)
+ if (pd->speed != sd->petDB->speed) {
+ if (pd->ud.walktimer != -1)
+ return 0; //Wait until the pet finishes walking back to master.
pd->speed = sd->petDB->speed;
+ }
if (pd->target_id) {
target= map_id2bl(pd->target_id);