// jshepard: TODO FIXME HACK this never ever produces desired, positive results. Events should be built to prepare for null entities, especially when dealing with
// script events. This will throw a warning, and events should be prepared to deal with null entities.
case D_EVENT_ENTITY :
if ( reinterpret_cast<idEntity *>( arg->value ) == NULL ) {
gameLocal.Warning( "idEvent::Alloc : NULL entity passed in to event function that expects a non-NULL pointer on arg # %d on '%s' event.", i, evdef->GetName() );
if ( *reinterpret_cast<idEntity **>( &args[ i ] ) == NULL ) {
gameLocal.Warning( "idEvent::ServiceEvents : NULL entity passed in to event function that expects a non-NULL pointer on arg # %d on '%s' event.", i, ev->GetName() );
file->Printf( "// generated file - see CREATE_EVENT_CODE\n\n" );
for( i = 1; i <= D_EVENT_MAXARGS; i++ ) {
file->Printf( "\t/*******************************************************\n\n\t\t%d args\n\n\t*******************************************************/\n\n", i );