As per our MSN conversation:
First comment out the old timer stuff in violence_update() in fight.c:
/*
for ( timer = ch->first_timer; timer; timer = timer_next )
{
timer_next = timer->next;
if ( --timer->count <= 0 )
{
if ( timer->type == TIMER_DO_FUN )
{
int tempsub;
DO_FUN *current = timer->do_fun;
tempsub = ch->substate;
ch->substate = timer->value;
extract_timer( ch, timer );
(current)( ch, "" );
if ( char_died(ch) )
break;
ch->substate = tempsub;
}
else
extract_timer( ch, timer );
}
}
*/
Add this to update.c somewhere:
void update_timers( void )
{
DESCRIPTOR_DATA *d;
CHAR_DATA *ch;
for ( d = first_descriptor; d; d = d->next )
{
if ( d->connected == CON_PLAYING )
ch = d->character;
else
continue;
for ( timer = ch->first_timer; timer; timer = timer_next )
{
timer_next = timer->next;
if ( --timer->count <= 0 )
{
if ( timer->type == TIMER_DO_FUN )
{
int tempsub;
DO_FUN *current = timer->do_fun;
tempsub = ch->substate;
ch->substate = timer->value;
extract_timer( ch, timer );
(current)( ch, "" );
if ( char_died(ch) )
break;
ch->substate = tempsub;
}
else
extract_timer( ch, timer );
}
}
}
return;
}
then in update_handler add:
static int pulse_timercheck;
if ( --pulse_timercheck <= 0 )
{
pulse_check = PULSE_TIMERCHECK;
update_timers ( );
}
add the PULSE_TIMERCHECK to mud.h
I whipped this up real quick, hopefully you can fill in the blanks. But this should give you control over the timers as you want.