src/update.c
/*
 * Handle all kinds of updates.
 * Called once per pulse from game loop.
 * Random times to defeat tick-timing clients and players.
 */
Handle all kinds of updates.
Called once per pulse from game loop.
Random times to defeat tick-timing clients and players.
Handle all kinds of updates . Called once per pulse from game loop . Random times to defeat tick - timing clients and players .
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;
	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;
	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_music ; if ( -- pulse_area <= 0 ) { pulse_area = PULSE_AREA ; 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 ( " " , NULL , NULL , WIZ_TICKS , 0 , 0 ) ; pulse_point = PULSE_TICK ; weather_update ( ) ; char_update ( ) ; obj_update ( ) ; } aggr_update ( ) ; tail_chain ( ) ; return ; }
Handle all kinds of updates.
Handle all kinds of updates .
/* number_range( PULSE_AREA / 2, 3 * PULSE_AREA / 2 ); */ /* number_range( PULSE_TICK / 2, 3 * PULSE_TICK / 2 ); */