put in some debug info about precache overflows

This commit is contained in:
Bill Currie 2001-05-12 03:24:29 +00:00
parent 6162fd8017
commit 72d8bd6af7

View file

@ -946,7 +946,7 @@ PF_precache_model (progs_t *pr)
if (sv.state != ss_loading) if (sv.state != ss_loading)
PR_RunError PR_RunError
(pr, "PF_Precache_*: Precache can only be done in spawn functions"); (pr, "PF_Precache_model: Precache can only be done in spawn functions");
s = G_STRING (pr, OFS_PARM0); s = G_STRING (pr, OFS_PARM0);
G_INT (pr, OFS_RETURN) = G_INT (pr, OFS_PARM0); G_INT (pr, OFS_RETURN) = G_INT (pr, OFS_PARM0);
@ -955,11 +955,13 @@ PF_precache_model (progs_t *pr)
for (i = 0; i < MAX_MODELS; i++) { for (i = 0; i < MAX_MODELS; i++) {
if (!sv.model_precache[i]) { if (!sv.model_precache[i]) {
sv.model_precache[i] = s; sv.model_precache[i] = s;
Con_DPrintf ("PF_precache_model: %3d %s\n", i, s);
return; return;
} }
if (!strcmp (sv.model_precache[i], s)) if (!strcmp (sv.model_precache[i], s))
return; return;
} }
Con_DPrintf ("PF_precache_model: %s\n", s);
PR_RunError (pr, "PF_precache_model: overflow"); PR_RunError (pr, "PF_precache_model: overflow");
} }