… | |
… | |
1871 | |
1871 | |
1872 | /* no monster == player tries to move into a wall or so */ |
1872 | /* no monster == player tries to move into a wall or so */ |
1873 | if (!mon) |
1873 | if (!mon) |
1874 | { |
1874 | { |
1875 | if (op->contr->ns->bumpmsg) |
1875 | if (op->contr->ns->bumpmsg) |
1876 | { |
|
|
1877 | op->play_sound (sound_find ("bump_wall")); |
|
|
1878 | |
|
|
1879 | for (object *ob = m->at (nx, ny).top; ob; ob = ob->below) |
1876 | for (object *ob = m->at (nx, ny).top; ob; ob = ob->below) |
1880 | if (op->move_type & ob->move_block) |
1877 | if (op->move_type & ob->move_block) |
|
|
1878 | { |
|
|
1879 | if (ob->move_block == MOVE_ALL) |
1881 | { |
1880 | { |
|
|
1881 | op->play_sound (sound_find ("bump_wall")); |
|
|
1882 | |
1882 | if (ob->invisible) |
1883 | op->statusmsg (ob->invisible |
1883 | op->statusmsg ("You bump into something."); |
1884 | ? "You bump into something." |
|
|
1885 | : format ("You bump into the %s.", query_name (ob)) |
|
|
1886 | ); |
|
|
1887 | } |
1884 | else |
1888 | else |
1885 | op->statusmsg (format ("You bump into the %s.", query_name (ob))); |
1889 | { |
|
|
1890 | op->play_sound (sound_find ("blocked_move")); |
1886 | |
1891 | |
|
|
1892 | op->statusmsg (ob->invisible |
|
|
1893 | ? "Something blocks you." |
|
|
1894 | : format ("Something blocks you from entering the %s.", query_name (ob)) |
|
|
1895 | ); |
|
|
1896 | } |
|
|
1897 | |
1887 | break; |
1898 | break; |
1888 | } |
1899 | } |
1889 | } |
|
|
1890 | |
1900 | |
1891 | return false; |
1901 | return false; |
1892 | } |
1902 | } |
1893 | |
1903 | |
1894 | mon = mon->head_ (); |
1904 | mon = mon->head_ (); |