git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1121 c06c8d41-db1a-0410-9941-cceddc491573
VMATCICB4F6UPNDTZ4AA6XT6JD33HG5T5Z33GLPPYEGI5HIJ6UBQC
X5WLJCJVW55SXZVP7IKP7ADCJIGNKN4PKAXFECVR6TNK7XSMZR7QC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
7AMQN7MITMXBNVDAK5VOXTQ4TZIAOD6ZLOFJG7GQMBTY23Y2BKSAC
template <typename Z> inline Z sgn(Z x){ return (x < 0? -1 : (x > 0? 1 : 0));}
template <typename Z> inline Z sgn(Z x)
{
return (x < 0? -1 : (x > 0? 1 : 0));
}
int dx = targ->x - monster->x; if (dx) dx /= dx;
int dx = targ->x - monster->x;
if (dx)
dx /= dx;
int dx = sgn(targ->x - monster->x); int dy = sgn(targ->y - monster->y);
int dx = sgn(targ->x - monster->x);
int dy = sgn(targ->y - monster->y);
int dy = targ->y - monster->y; if (dy) dy /= dy;
int dy = targ->y - monster->y;
if (dy)
dy /= dy;
// No multiple ghosts until level 14 of the Main Dungeon.
// No multiple ghosts until level 9 of the Main Dungeon.