found = FALSE;
if( event == event_list )
{ event_list = event->next;
found = TRUE;
}
if( event == event_last )
{ if(!event_list)
event_last = NULL;
else
for( tmp = event_list ; tmp ; tmp = tmp->next )
if(tmp->next == event)
tmp->next = event->next;
return;
}
if(!found)
for(tmp = event_list ; tmp ; tmp = tmp->next )
if(tmp->next == event )
tmp->next = event->next;
event->next = event_free;
event_free = event;
event->next_event = NULL;
return;
}
I figure there has to be some sort of subtle problem in the memory recycling within the event handler as shipped, but I've gone through it as carefully as I can and cannot find it. The function working recursively is obviously not how'd I prefer it (I don't love the people zooming around, and it doesn't give falling people a chance to catch themselves with spells, and it could crash if someone had a long enough fall). I have, however, run out of thoughts on how to make it work my way…
Well, you've seen my output…it doesn't warn me about anything like that :cry: