X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=model_shared.c;fp=model_shared.c;h=91ba91e0c887b8d3c119cb1d95391c94beb4017f;hb=acdd55a695050845def0dce89ea84b06cb990b0a;hp=4c66d78e3fa422d6fa82fe56c14169f34bcd9319;hpb=c1cdd464957886b68695b091829379867155c180;p=xonotic%2Fdarkplaces.git diff --git a/model_shared.c b/model_shared.c index 4c66d78e..91ba91e0 100644 --- a/model_shared.c +++ b/model_shared.c @@ -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);