spaces inside the arena viewport. Since rock worms can be teleported into non-permanent rock walls, and the entire level outside the arena is filled with non-permanent rock walls, this prevents rock worms from being teleported outside the arena.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8419 c06c8d41-db1a-0410-9941-cceddc491573
IEDTXEFGQU56UAY5HNWGZOI7TG2H2BECGLJ6PY2DVQFBPWTS3QMQC
target.x = 10 + random2(GXM - 20);
target.y = 10 + random2(GYM - 20);
if (crawl_state.arena)
{
const coord_def &ul = crawl_view.glos1; // Upper left
const coord_def &lr = crawl_view.glos2; // Lower right
target.x = ul.x + random2(lr.x - ul.x);
target.y = ul.y + random2(lr.y - ul.y);
}
else
{
target.x = 10 + random2(GXM - 20);
target.y = 10 + random2(GYM - 20);
}