From bc8acf4a291b7c094459534c2621c60e8e21dec6 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Mon, 11 Mar 2002 06:41:47 +0000 Subject: [PATCH] steed/leash bit It's possible to leashed a saddled pet and them ride it, but it wasn't possible to remove the leash while mounted. This fixes that; it also lets you put the leash on your steed while mounted, but there's nothing wrong with that. --- src/apply.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/apply.c b/src/apply.c index 780f8c9b2..50f9ddf19 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)apply.c 3.4 2002/02/07 */ +/* SCCS Id: @(#)apply.c 3.4 2002/03/09 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -406,6 +406,13 @@ struct obj *obj; y = u.uy + u.dy; if((x == u.ux) && (y == u.uy)) { +#ifdef STEED + if (u.usteed && u.dz > 0) { + mtmp = u.usteed; + spotmon = 1; + goto got_target; + } +#endif pline("Leash yourself? Very funny..."); return; } @@ -416,6 +423,9 @@ struct obj *obj; } spotmon = canspotmon(mtmp); +#ifdef STEED + got_target: +#endif if(!mtmp->mtame) { if(!spotmon)