Merge branch 'terencehill/quickmenu_file_example' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / commands / cl_cmd.qc
index 6af90c0..63e0c56 100644 (file)
@@ -8,8 +8,7 @@
 
 #include "../autocvars.qh"
 #include "../defs.qh"
-#include "../hud.qh"
-#include "../hud_config.qh"
+#include "../hud/all.qh"
 #include "../main.qh"
 #include "../mapvoting.qh"
 #include "../miscfunctions.qh"
@@ -172,15 +171,13 @@ void LocalCommand_debugmodel(int request, int argc)
                case CMD_REQUEST_COMMAND:
                {
                        string modelname = argv(1);
-                       entity debugmodel_entity;
 
-                       debugmodel_entity = spawn();
+                       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;
-                       debugmodel_entity.classname = "debugmodel";
 
                        return;
                }