while(1)
;
void violence_update( void )
{
CHAR_DATA *ch;
CHAR_DATA *ch_next;
CHAR_DATA *victim;
for ( ch = char_list; ch != NULL; ch = ch->next )//should be ch_next (will not save you anyway, bad architecture is bad architectre
{
ch_next = ch->next; //yeah right goood code well maintained….
if ( ( victim = ch->fighting ) == NULL || ch->in_room == NULL )
continue;
if ( IS_AWAKE(ch) && ch->in_room == victim->in_room )
multi_hit( ch, victim, TYPE_UNDEFINED ); //could kill ch, kill victim who knows
else
stop_fighting( ch, FALSE );
if ( ( victim = ch->fighting ) == NULL ) //ch could be dead there…if area effect was used, ch_next also by the way and ch->next->next etc….anyway ic ch was extracted it is a mess of uninitialized values you are checking
continue;
/*
* Fun for the whole family!
*/
check_assist(ch,victim); //will make your groupies start the fight….but ya know what if they are later in the loop they will go through this same method and have a free round of attack !
}
return;
}
void violence_update( void )
–snip–
When your errant bit of code evolves into sentience overnight and enslaves the human race, I'm gonna be so pissed off at you, Runter.