User Name:


Forgot your password?
Vote for Us!
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Bing

Members: 0
Guests: 15
Newest Member
Today's Birthdays
Evoru (33)
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Bug in will_fall( )
Forum Rules | Mark all | Recent Posts

Bug in will_fall( )
< Newer Topic :: Older Topic > Flying mounts not working...

Pages:<< prev 1 next >>
Post is unread #1 Oct 23, 2017, 1:35 am   Last edited Oct 23, 2017, 1:36 am by GatewaySysop
Go to the top of the page
Go to the bottom of the page

JoinedMar 7, 2005

Really scratching my head on this one. Flying mounts do not work in stock code. Surprised nobody noticed this long ago, but I guess I haven't play tested it until now either, so ... :biggrin:

Anyway, if you look in act_move.c, function will_fall( ), you'll see this:

bool will_fall( CHAR_DATA * ch, int fall )
   if( xIS_SET( ch->in_room->room_flags, ROOM_NOFLOOR ) && CAN_GO( ch, DIR_DOWN )
       && ( !IS_AFFECTED( ch, AFF_FLYING ) || ( ch->mount && !IS_AFFECTED( ch->mount, AFF_FLYING ) ) ) )

Because of the way it is written, the check still works as expected with no mount, i.e. ch falls if not AFF_FLYING. The problem is that, presumably, ch will be most often using a flying mount when ch can't fly themselves. And therein lies the quandary. The way this is written, with the OR condition, the mere fact that ch isn't flying is sufficient to cause the check to return TRUE and subsequently drop ch into the room below.

What I believe they meant to do was this:

    if ( xIS_SET( ch->in_room->room_flags, ROOM_NOFLOOR ) && CAN_GO( ch, DIR_DOWN )
    && !( IS_AFFECTED( ch, AFF_FLYING ) || ( ch->mount && IS_AFFECTED( ch->mount, AFF_FLYING ) ) ) )

That is to say, make it so that ch will fall if not either AFF_FLYING or mounted on a mobile that is AFF_FLYING.

Hope that helps to get your flying mounts working as intended. :cyclops:

Pages:<< prev 1 next >>