From b01f2f69d8e42c2d9c0045643fcd816c170f3d60 Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 8 Nov 2021 08:47:36 +0000 Subject: [PATCH] Make the hl2 plugin state if any individual parts fail to init instead of finding it out later... git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6117 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- plugins/hl2/hl2.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/hl2/hl2.c b/plugins/hl2/hl2.c index e007d60eb..3406b0fc7 100644 --- a/plugins/hl2/hl2.c +++ b/plugins/hl2/hl2.c @@ -7,12 +7,16 @@ qboolean VBSP_Init(void); qboolean Plug_Init(void) { - if (!VPK_Init()) - return false; - VTF_Init(); - VMT_Init(); - MDL_Init(); - VBSP_Init(); - return true; + qboolean somethingisokay = false; + char plugname[128]; + strcpy(plugname, "hl2"); + plugfuncs->GetPluginName(0, plugname, sizeof(plugname)); + + if (!VPK_Init()) Con_Printf(CON_ERROR"%s: VPK support unavailable\n", plugname); else somethingisokay = true; + if (!VTF_Init()) Con_Printf(CON_ERROR"%s: VTF support unavailable\n", plugname); else somethingisokay = true; + if (!VMT_Init()) Con_Printf(CON_ERROR"%s: VMT support unavailable\n", plugname); else somethingisokay = true; + if (!MDL_Init()) Con_Printf(CON_ERROR"%s: MDL support unavailable\n", plugname); else somethingisokay = true; + if (!VBSP_Init()) Con_Printf(CON_ERROR"%s: BSP support unavailable\n", plugname); else somethingisokay = true; + return somethingisokay; }