renamed varray_ arrays to rsurface_array_, and they are no longer used outside the...
[xonotic/darkplaces.git] / model_shared.c
index 8fa9a53..5277a4e 100644 (file)
@@ -169,7 +169,12 @@ model_t *Mod_LoadModel(model_t *mod, qboolean crash, qboolean checkdisk, qboolea
                }
        }
        if (mod->loaded)
-               return mod; // already loaded
+       {
+               // already loaded
+               if (buf)
+                       Mem_Free(buf);
+               return mod;
+       }
 
        Con_DPrintf("loading model %s\n", mod->name);
        // LordHavoc: unload the existing model in this slot (if there is one)
@@ -230,15 +235,6 @@ model_t *Mod_LoadModel(model_t *mod, qboolean crash, qboolean checkdisk, qboolea
        return mod;
 }
 
-/*
-===================
-Mod_ClearAll
-===================
-*/
-void Mod_ClearAll(void)
-{
-}
-
 void Mod_ClearUsed(void)
 {
 #if 0