riding a non-swimming steed into water

Patch from <Someone> to the list on 10/01/2001.  The changes cause riding a steed
into water to result in a dismount, and, if the steed can't survive in
water, the death of the steed, with the usual pet-death penalties.
This commit is contained in:
cohrs
2002-01-16 07:05:43 +00:00
parent 4361289ec3
commit e3ac04eac1
3 changed files with 29 additions and 9 deletions

View File

@@ -1348,8 +1348,21 @@ stillinwater:;
/* limit recursive calls through teleds() */
if(is_lava(u.ux,u.uy) && lava_effects())
return;
if(is_pool(u.ux,u.uy) && !Wwalking && drown())
if (is_pool(u.ux, u.uy)) {
#ifdef STEED
if (u.usteed && !is_flyer(u.usteed->data) &&
!is_floater(u.usteed->data) &&
!is_clinger(u.usteed->data)) {
dismount_steed(Underwater ?
DISMOUNT_FELL : DISMOUNT_GENERIC);
/* dismount_steed() -> float_down() -> pickup() */
if (!Is_airlevel(&u.uz) && !Is_waterlevel(&u.uz))
pick = FALSE;
} else
#endif
if (!Wwalking && drown())
return;
}
}
check_special_room(FALSE);
#ifdef SINKS