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, Sogou

Members: 0
Guests: 18
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,396
629
DarrenPayn
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Sectors have a slight possibl...
Forum Rules | Mark all | Recent Posts

Sectors have a slight possible issue
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Feb 27, 2006, 5:26 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,874
JoinedJul 26, 2005

in mud.h we have these
#define BVSECT_INSIDE 			BV00
#define BVSECT_CITY 			BV01
#define BVSECT_FIELD 			BV02
#define BVSECT_FOREST 			BV03
#define BVSECT_HILLS 			BV04
#define BVSECT_MOUNTAIN 		BV05
#define BVSECT_WATER_SWIM 		BV06
#define BVSECT_WATER_NOSWIM 		BV07
#define BVSECT_UNDERWATER 		BV08
#define BVSECT_AIR 			BV09
#define BVSECT_DESERT 			BV10
#define BVSECT_DUNNO 			BV11
#define BVSECT_OCEANFLOOR 		BV12
#define BVSECT_UNDERGROUND 		BV13
#define BVSECT_LAVA			BV14
#define BVSECT_SWAMP			BV15
#define MAX_SECFLAG 			15

the only one of those used is MAX_SECFLAG which is found in skills.c
      if( !str_cmp( arg2, "sector" ) )
      {
         char tmp_arg[MAX_STRING_LENGTH];

         while( argument[0] != '\0' )
         {
            argument = one_argument( argument, tmp_arg );
            value = get_secflag( tmp_arg );
            if( value < 0 || value > MAX_SECFLAG )
               ch_printf( ch, "Unknown flag: %s\r\n", tmp_arg );
            else
               TOGGLE_BIT( skill->spell_sector, ( 1 << value ) );
         }
         send_to_char( "Ok.\r\n", ch );
         return;
      }

it should have >= SECT_MAX instead of the MAX_SECFLAG there so its using the correct one and the things in mud.h should just be removed.
By all means check it all out yourself before removing but I think thats it for it :)
       
Post is unread #2 Feb 27, 2006, 6:19 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

I'm sure there was once an interesting purpose intended for the BV sector flags. One must admit, it would have been interesting to see rooms that were both field and jungle, or indoors and desert. But alas, this is one of those unfinished bits of code that probably should never have been included.

As for the specific use in skills.c, I beleieve that was intended to allow a spell to be used in a certain sector type, or in multiple sector types. The only way multiples can be possible is if you use some kind of flagging, so technically the usage is correct as is.
       
Post is unread #3 Feb 27, 2006, 6:33 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,874
JoinedJul 26, 2005

But if you add new sectors to the correct place in mud.h and don't fix that in skills.c it won't be able to handle the new ones. Thats why I said it probably should be changed to the correct part that actually does the sectors.
       
Post is unread #4 Feb 27, 2006, 6:35 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

Yes, but the real sector array is not used in bitvector fasion, so it would have to at least be considered because then the section in skills.c which needs to be modified will only be able to set a single sector type instead of multiples.
       
Post is unread #5 Feb 27, 2006, 6:50 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,874
JoinedJul 26, 2005

lol, yea i understand that, but the new sectors (if put before SECT_MAX) will start at 15 which is the same as MAX_SECFLAG, so the new ones you wouldnt even be able to set...see what im getting at here?
I do see your point though on it being set to actually use the others to allow more then one sector, but since that isn't finished shouldn't the thing be rewrote to actually work or the bvsectors finished to allow that to work? lol
       
Post is unread #6 Feb 27, 2006, 8:43 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Course, I kind of like the dunno sector type myself.. but I could see combinations (like air & desert) having different weather affects.. and why couldn't you reasonably combine a few of them? I'll grant that underwater & desert seem a bit odd, but underwater & underground might not be, nor desert & mountain, just as a couple of examples right off.

as for fixing the skills.c issue, I guess I'll just wait and see what you two decide since I don't recall this one ever cropping up as an actual problem yet... ;)
       
Pages:<< prev 1 next >>