Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Yahoo!, Bing

Members: 0
Guests: 34
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
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

GatewaySysop
Conjurer
GroupMembers
Posts367
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 >>