MEDIT (medit_act)
{ /* Moved out of medit() due to naming conflicts – Hugin */
MOB_INDEX_DATA *pMob;
int value;
if (argument[0] != '\0')
{
EDIT_MOB (ch, pMob);
if ((value = flag_value (act_flags, argument)) != NO_FLAG)
{
pMob->act ^= value;
SET_BIT (pMob->act, ACT_IS_NPC);
send_to_char ("Act flag toggled.\n\r", ch);
return TRUE;
}
}
send_to_char ("Syntax: act [flag]\n\r"
"Type '? act' for a list of flags.\n\r", ch);
return FALSE;
}
MEDIT (medit_act)
{ /* Moved out of medit() due to naming conflicts – Hugin */
MOB_INDEX_DATA *pMob;
int value;
if (argument[0] != '\0')
{
EDIT_MOB (ch, pMob);
if ((value = flag_value (act_flags, argument)) != NO_FLAG)
{
pMob->act ^= value;
SET_BIT (pMob->act, ACT_IS_NPC);
send_to_char ("Act flag toggled.\n\r", ch);
return TRUE;
}
}
send_to_char ("Syntax: act [flag]\n\r"
"Type '? act' for a list of flags.\n\r", ch);
return FALSE;
}
if (!IS_SET (pMob->act, ACT_IS_NPC))
So the code will look like this or similar:
Reason for that extra if statement is a very nice crashing bug where you type act without an argument, it will take all bit flags away including npc which if you take the npc flag away from an npc thats an instant crash. All these years ive never noticed it till it happened to me by accident.