Login
User Name:

Password:



Register

Forgot your password?
void nanny_get_new_race -- comm.c
Mar 13, 2025 7:08 am
By Elwood
IPv6
Jan 25, 2025 10:45 pm
By Samson
mudstrlcpy and mudstrlcat
Jan 18, 2025 5:23 pm
By Samson
I3 and IMC
Jan 17, 2025 9:35 pm
By Samson
AFKMud 2.5.1
Jan 17, 2025 2:22 pm
By Samson
SWFotEFUSS 1.5.3
Author: Various
Submitted by: Samson
SWRFUSS 1.4.3
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.8
Author: Various
Submitted by: Samson
AFKMud 2.5.2
Author: AFKMud Team
Submitted by: Samson
SmaugFUSS 1.9.7
Author: Various
Submitted by: Samson
Users Online
Anthropic, Amazonbot, AhrefsBot, Bing

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
507
3,812
19,722
591
TracySpencer

» 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,707
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 >>