better detection of model load failures in viewmodel command
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 19 Jun 2005 17:47:30 +0000 (17:47 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 19 Jun 2005 17:47:30 +0000 (17:47 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5450 d7cf8633-e32d-0410-b094-e92efae38249

host_cmd.c

index 59eaee0..79665d2 100644 (file)
@@ -1681,9 +1681,9 @@ void Host_Viewmodel_f (void)
                return;
 
        m = Mod_ForName (Cmd_Argv(1), false, true, false);
-       if (!m)
+       if (!m || !m->loaded || !m->Draw)
        {
-               Con_Printf("Can't load %s\n", Cmd_Argv(1));
+               Con_Printf("viewmodel: can't load %s\n", Cmd_Argv(1));
                return;
        }