Login
User Name:

Password:



Register

Forgot your password?
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
SWRFUSS 1.4
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.4
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.3
Author: Various
Submitted by: Samson
Users Online
CommonCrawl, SemrushBot, AhrefsBot, Bing

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
486
3,758
19,453
572
Fjolsvith

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