From 3b554f3742ddfa61c7d224f25d725a29753947bd Mon Sep 17 00:00:00 2001 From: Shpoike Date: Sat, 2 Nov 2024 14:37:58 +0000 Subject: [PATCH] Fix a couple of issues with the hl2 plugin. --- engine/common/com_bih.c | 2 +- plugins/hl2/mat_vmt.c | 2 +- plugins/hl2/mod_vbsp.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/engine/common/com_bih.c b/engine/common/com_bih.c index 03165409a..b61c252dc 100644 --- a/engine/common/com_bih.c +++ b/engine/common/com_bih.c @@ -896,7 +896,7 @@ static void BIH_RecursiveTrace (struct bihtrace_s *fte_restrict tr, const struct VectorSubtract (tr->startpos, node->data.mesh.tr->origin, start_l); VectorSubtract (tr->endpos, node->data.mesh.tr->origin, end_l); - node->data.mesh.model->funcs.NativeTrace(node->data.mesh.model, 0, NULLFRAMESTATE, node->data.mesh.tr->axis, start_l, end_l, tr->size.min, tr->size.max, tr->shape==shape_iscapsule, tr->hitcontents, &sub); + submod->funcs.NativeTrace(submod, 0, NULLFRAMESTATE, node->data.mesh.tr->axis, start_l, end_l, tr->size.min, tr->size.max, tr->shape==shape_iscapsule, tr->hitcontents, &sub); if (sub.truefraction < tr->trace.truefraction) { diff --git a/plugins/hl2/mat_vmt.c b/plugins/hl2/mat_vmt.c index 1be8be424..d9aaa8444 100644 --- a/plugins/hl2/mat_vmt.c +++ b/plugins/hl2/mat_vmt.c @@ -682,7 +682,7 @@ static qboolean VMT_ReadVMT(const char *fname, vmtstate_t *st) { char *line, *file = NULL; com_tokentype_t ttype; - char token[MAX_QPATH]; + char token[MAX_QPATH*2]; char *prefix="", *postfix=""; if (strstr(fname, "://")) diff --git a/plugins/hl2/mod_vbsp.c b/plugins/hl2/mod_vbsp.c index 41ec59c24..39f876e30 100644 --- a/plugins/hl2/mod_vbsp.c +++ b/plugins/hl2/mod_vbsp.c @@ -238,7 +238,8 @@ enum hllumps_e typedef struct { unsigned int fileofs; unsigned int filelen; - unsigned int foo[2]; + unsigned int version; + unsigned int fourcc; } vlump_t; typedef struct { unsigned int magic;