unpaid sanity_check: leaving shop via recoil

Throwing while levitating or getting hit for knockback effect could
move hero carrying unpaid items out of a shop.  If that happened,
sanity_check complained that unpaid items weren't in a tended shop.

Check for entering and leaving special rooms during recoil same as
gets done for ordinary movement.  Leaving a shop via recoil or
knockback while owing a bill now gets treated as robbery immediately
rather than waiting until hero voluntarily moves to another spot
after recoil has finished.
This commit is contained in:
PatR
2022-12-06 10:57:14 -08:00
parent f61a862a47
commit e724034995
2 changed files with 10 additions and 0 deletions

View File

@@ -917,6 +917,10 @@ hurtle_step(genericptr_t arg, coordxy x, coordxy y)
if (levl[u.ux][u.uy].typ != levl[ox][oy].typ)
switch_terrain();
/* might be entering a special room (treasure zoo, thrown room, &c) that
has a first-time entry message, or leaving shop with unpaid goods */
check_special_room(FALSE);
if (is_pool(x, y) && !u.uinwater) {
if ((Is_waterlevel(&u.uz) && is_waterwall(x,y))
|| !(Levitation || Flying || Wwalking)) {