Fix stupid oversight - I forgot to actually set qcvm->GetModel.

This commit is contained in:
Spike 2018-05-07 19:32:50 +01:00 committed by Shpoike
parent c68c11c7d8
commit 13736f1fd3
2 changed files with 16 additions and 0 deletions

View file

@ -682,6 +682,14 @@ void Host_ServerFrame (void)
SV_SendClientMessages ();
}
//used for cl.qcvm.GetModel (so ssqc+csqc can share builtins)
qmodel_t *CL_ModelForIndex(int index)
{
if (index < 0 || index >= MAX_MODELS)
return NULL;
return cl.model_precache[index];
}
/*
==================
Host_Frame

View file

@ -2938,6 +2938,13 @@ void SV_SaveSpawnparms (void)
}
}
//used for sv.qcvm.GetModel (so ssqc+csqc can share builtins)
qmodel_t *SV_ModelForIndex(int index)
{
if (index < 0 || index >= MAX_MODELS)
return NULL;
return sv.models[index];
}
/*
================
@ -3050,6 +3057,7 @@ void SV_SpawnServer (const char *server)
return;
}
sv.models[1] = qcvm->worldmodel;
qcvm->GetModel = SV_ModelForIndex;
//
// clear world interaction links