From 13736f1fd3a38c5e981601b24bc2983f6bd7464c Mon Sep 17 00:00:00 2001 From: Spike Date: Mon, 7 May 2018 19:32:50 +0100 Subject: [PATCH] Fix stupid oversight - I forgot to actually set qcvm->GetModel. --- Quake/host.c | 8 ++++++++ Quake/sv_main.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/Quake/host.c b/Quake/host.c index d65d35ec..b1a045d1 100644 --- a/Quake/host.c +++ b/Quake/host.c @@ -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 diff --git a/Quake/sv_main.c b/Quake/sv_main.c index 5674447d..84c1e7d6 100644 --- a/Quake/sv_main.c +++ b/Quake/sv_main.c @@ -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