Don't make slip on blood checks when climbing stairs.

This commit is contained in:
Rob Pearce 2016-06-01 15:03:44 +10:00
parent 4a072fefc8
commit 918687dcd7
1 changed files with 4 additions and 3 deletions

7
move.c
View File

@ -2666,14 +2666,15 @@ int initiatemove(lifeform_t *lf, cell_t *cell, int onpurpose, int *didmsg) {
} }
// slipping on something before moving? // slipping on something before moving? note: we use 'cell' here
// rather than lf->cell so that we can skip the check when using stairs.
if (!attacking && onpurpose) { if (!attacking && onpurpose) {
if (!isairborne(lf, NULL)) { if (cell && !isairborne(lf, NULL)) {
int slip; int slip;
object_t *slipob; object_t *slipob;
if (!lfhasflag(lf, F_CAREFULMOVE)) { if (!lfhasflag(lf, F_CAREFULMOVE)) {
slip = getslipperyness(lf->cell, &slipob); slip = getslipperyness(cell, &slipob);
if (slip && !skillcheck(lf, SC_SLIP, slip, 0)) { if (slip && !skillcheck(lf, SC_SLIP, slip, 0)) {
if (!slipon(lf, slipob)) { if (!slipon(lf, slipob)) {
if (didmsg) *didmsg = B_TRUE; if (didmsg) *didmsg = B_TRUE;