mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-22 01:01:18 +00:00
collision: fix crash without vis info
This commit is contained in:
parent
30861e07ef
commit
1e935a5879
1 changed files with 6 additions and 0 deletions
|
@ -2185,6 +2185,12 @@ CM_LoadCachedMap(const char *name, model_t *mod)
|
|||
Mod_LoadVisibility(mod->name, &mod->map_vis, &mod->numvisibility,
|
||||
cmod_base, &header.lumps[LUMP_VISIBILITY]);
|
||||
|
||||
if (!mod->map_vis)
|
||||
{
|
||||
Com_Error(ERR_DROP, "%s: Map %s has visual clusters.",
|
||||
__func__, name);
|
||||
}
|
||||
|
||||
if (mod->numclusters != mod->map_vis->numclusters)
|
||||
{
|
||||
Com_Error(ERR_DROP, "%s: Map %s has incorrect number of clusters %d != %d",
|
||||
|
|
Loading…
Reference in a new issue