void update_handler( void ) { static int pulse_area; static int pulse_mobile; static int pulse_violence; static int pulse_point; static int pulse_music; if ( --pulse_area <= 0 ) { pulse_area = PULSE_AREA; /* number_range( PULSE_AREA / 2, 3 * PULSE_AREA / 2 ); */ area_update ( ); } if ( --pulse_music <= 0 ) { pulse_music = PULSE_MUSIC; song_update(); } if ( --pulse_mobile <= 0 ) { pulse_mobile = PULSE_MOBILE; mobile_update ( ); } if ( --pulse_violence <= 0 ) { pulse_violence = PULSE_VIOLENCE; violence_update ( ); } if ( --pulse_point <= 0 ) { wiznet("TICK!",NULL,NULL,WIZ_TICKS,0,0); pulse_point = PULSE_TICK; /* number_range( PULSE_TICK / 2, 3 * PULSE_TICK / 2 ); */ weather_update ( ); char_update ( ); obj_update ( ); } aggr_update( ); tail_chain( ); return; }
void update_handler( void ) { static int pulse_area; static int pulse_mobile; static int pulse_violence; static int pulse_point; static int pulse_room; struct timeval start; gettimeofday( &start, NULL ); event_update( ); delete_list( extracted ); if( --pulse_area <= 0 ) { pulse_area = number_range( PULSE_AREA/2, 3*PULSE_AREA/2 ); area_update( ); } if( --pulse_mobile <= 0 ) { pulse_mobile = PULSE_MOBILE; action_update( ); auction_update( ); regen_update( ); time_update( ); } if( --pulse_point <= 0 ) { pulse_point = number_range( PULSE_TICK/2, 3*PULSE_TICK/2 ); char_update( ); obj_update( ); } if( --pulse_room <= 0 ) { pulse_room = number_range( PULSE_ROOM/2, 3*PULSE_ROOM/2 ); room_update( ); w3_who( ); } if( --pulse_violence <= 0 ) { pulse_violence = PULSE_VIOLENCE; update_queue( ); } pulse_time[ TIME_UPDATE ] = stop_clock( start ); }