… | |
… | |
47 | } |
47 | } |
48 | |
48 | |
49 | if ($tr->move ($dir, $ob)) { |
49 | if ($tr->move ($dir, $ob)) { |
50 | # do multiple loops in case some player/item blocks another |
50 | # do multiple loops in case some player/item blocks another |
51 | # do not endlessly loop as the server is far too broken, e.g. |
51 | # do not endlessly loop as the server is far too broken, e.g. |
52 | # you can drop floor son top of non-floors etc. |
52 | # you can drop floors on top of non-floors etc. |
53 | for (1..50) { |
53 | for (1..50) { |
54 | @ontop or last; |
54 | @ontop or last; |
55 | @ontop = map $_->move ($dir, $_) ? () : $_, @ontop; |
55 | @ontop = map $_->move ($dir, $_) ? () : $_, @ontop; |
56 | } |
56 | } |
57 | } |
57 | } |