Login
User Name:

Password:



Register

Forgot your password?
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
Users Online
Bing, Yandex

Members: 0
Guests: 33
Stats
Files
Topics
Posts
Members
Newest Member
489
3,791
19,644
596
Elwood

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Bugfix Lists » AFKMud Bugfix List » [Bug] Oasis OLC module handle...
Forum Rules | Mark all | Recent Posts

[Bug] Oasis OLC module handles mob gender settings improperly
< Newer Topic :: Older Topic > AFKMud 2.03

Pages:<< prev 1 next >>
Post is unread #1 Feb 16, 2008 7:19 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,685
JoinedJan 1, 2002

 
Bug: Oasis OLC module handles mob gender settings improperly
Danger: Low - Mobs set using the code may end up with incorrect gender settings, but otherwise has no real affect.
Discovered in: AFKMud 2.03
Found by: Samson
Fixed by: Samson

---

olcmob.cpp, medit_parse

Locate:
      case MEDIT_SEX:
         victim->sex = URANGE( 0, atoi( arg ), 2 );
         if( victim->has_actflag( ACT_PROTOTYPE ) )
            victim->pIndexData->sex = victim->sex;
         olc_log( d, "Changed sex to %s", victim->sex == 1 ? "Male" : victim->sex == 2 ? "Female" : "Neutral" );
         break;


Change to:
      case MEDIT_SEX:
         victim->sex = URANGE( 0, atoi( arg ), SEX_MAX - 1 );
         if( victim->has_actflag( ACT_PROTOTYPE ) )
            victim->pIndexData->sex = victim->sex;
         olc_log( d, "Changed sex to %s", victim->sex == SEX_MALE ? "Male" : victim->sex == SEX_FEMALE ? "Female" : victim->sex == SEX_NEUTRAL ? "Neutral" : "Hermaphrodyte" );
         break;


The original range argument on this block of code would cut off hermaphrodyte settings if they were used, and the text reporting was a source of confusion for what actually happened. It could lead to going back to correct settings that weren't wrong to begin with. The use of hardcoded values wasn't helping things either.

Pages:<< prev 1 next >>