Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
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, Yandex

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » movement_loss
Forum Rules | Mark all | Recent Posts

movement_loss
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Aug 15, 2015, 8:21 pm   Last edited Aug 15, 2015, 8:47 pm by Matteo2303
Go to the top of the page
Go to the bottom of the page

Matteo2303
Apprentice
GroupMembers
Posts57
JoinedAug 25, 2003

movement_loss array doesn't match sect_max...

const short movement_loss[SECT_MAX] = {
1, 2, 2, 3, 4, 6, 4, 1, 6, 10, 6, 5, 7, 4
};

typedef enum
{
SECT_INSIDE, SECT_CITY, SECT_FIELD, SECT_FOREST, SECT_HILLS, SECT_MOUNTAIN,
SECT_WATER_SWIM, SECT_WATER_NOSWIM, SECT_UNDERWATER, SECT_AIR, SECT_DESERT,
SECT_DUNNO, SECT_OCEANFLOOR, SECT_UNDERGROUND, SECT_LAVA, SECT_SWAMP, SECT_ICE,
SECT_MAX
} sector_types;

so in fight.c

if( !IS_AFFECTED( ch, AFF_FLYING ) && !IS_AFFECTED( ch, AFF_FLOATING ) )
move = encumbrance( ch, movement_loss[UMIN( SECT_MAX - 1, ch->in_room->sector_type )] );

could be a problem I think.

ps: check also sect_names, sent_total and room_sents array.
bye
matteo
       
Post is unread #2 Aug 23, 2015, 1:31 am
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts390
JoinedMar 7, 2005

Nice catch. Probably missed since (as far as I know) stock areas don't even use the missing sector types and the stock help files don't mention them either. :facepalm:

Thanks for sharing this find, it was a good excuse to get back into the code and make another update. :cool:

       
Pages:<< prev 1 next >>