Pets avoid a location hero just kicked

If hero kicks a location, pets and peacefuls will avoid moving
into that location for that turn.
This commit is contained in:
Pasi Kallinen
2024-04-11 18:05:12 +03:00
parent 62b78ba037
commit f1c77aa2fd
9 changed files with 37 additions and 1 deletions

View File

@@ -3446,8 +3446,14 @@ rhack(int key)
}
/* reset_cmd_vars() sets context.move to False so we might
need to change it [back] to True */
if ((res & ECMD_TIME) != 0)
if ((res & ECMD_TIME) != 0) {
gc.context.move = TRUE;
if (func != dokick) {
/* hero did something else than kicking a location;
reset the location, so pets don't avoid it */
gk.kickedloc.x = 0, gk.kickedloc.y = 0;
}
}
return;
}
/* if we reach here, cmd wasn't found in cmdlist[] */