{
string modelname = argv(1);
- entity debugmodel_entity = new(debugmodel);
- precache_model(modelname);
- _setmodel(debugmodel_entity, modelname);
- setorigin(debugmodel_entity, view_origin);
- debugmodel_entity.angles = view_angles;
- debugmodel_entity.draw = DrawDebugModel;
- IL_PUSH(g_drawables, debugmodel_entity);
-
- return;
+ if (modelname != "")
+ {
+ entity debugmodel_entity = new(debugmodel);
+ precache_model(modelname);
+ _setmodel(debugmodel_entity, modelname);
+ setorigin(debugmodel_entity, view_origin);
+ debugmodel_entity.angles = view_angles;
+ debugmodel_entity.draw = DrawDebugModel;
+ IL_PUSH(g_drawables, debugmodel_entity);
+ return;
+ }
+ // fall through
}
default: