Beispiel #1
0
static void _sig_term_handler_(int sig) {
	AVOID_NOUSED(sig);
	int fd = g_executor.log_path_ ? open(g_executor.log_path_ , O_APPEND|O_CREAT|O_WRONLY, 0644) : STDOUT_FILENO;
	if (fd == -1) {
		Event_Stop(g_executor.evloop);
	}
	write(fd , "SERVER SHUTDOWN!\n" , 17);
	close(fd);
	Event_Stop(g_executor.evloop);
	sleep(3);//wait 3 seconds for processing unsaved events
	exit(1);//force exit if there is still not any events incomming after 3 seconds
}
Beispiel #2
0
/*
=================
rvEffect::Event_Activate
=================
*/
void rvEffect::Event_Activate( idEntity *activator ) {
    // Stop the effect if its already playing
    if( !clientEntities.IsListEmpty ( ) ) {
        Event_Stop ( );
    } else {
        Event_Start ( );
    }

    ActivateTargets( activator );
}