]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.c
Restore old video init behavior, pending better solution. Fixes Steel Storm crash...
[xonotic/darkplaces.git] / model_shared.c
index 4c66d78e3fa422d6fa82fe56c14169f34bcd9319..91ba91e0c887b8d3c119cb1d95391c94beb4017f 100644 (file)
@@ -626,6 +626,8 @@ dp_model_t *Mod_FindName(const char *name, const char *parentname)
        return mod;
 }
 
+extern qbool vid_opened;
+
 /*
 ==================
 Mod_ForName
@@ -636,6 +638,11 @@ Loads in a model for the given name
 dp_model_t *Mod_ForName(const char *name, qbool crash, qbool checkdisk, const char *parentname)
 {
        dp_model_t *model;
+
+       // FIXME: So we don't crash if a server is started early.
+       if(!vid_opened)
+               Host_StartVideo();
+
        model = Mod_FindName(name, parentname);
        if (!model->loaded || checkdisk)
                Mod_LoadModel(model, crash, checkdisk);