void extract_trigger(struct trig_data *trig)
{
struct trig_data *temp;
if (GET_TRIG_WAIT(trig)) {
event_cancel(GET_TRIG_WAIT(trig));
GET_TRIG_WAIT(trig) = NULL;
}
trig_index[trig->nr]->number--;
/* walk the trigger list and remove this one */
REMOVE_FROM_LIST(trig, trigger_list, next_in_world);
free_trigger(trig);
}