From 88eb9e118a49b1ade06b696758f6c243bde7ac87 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 26 Jul 2001 15:33:55 +0000 Subject: [PATCH] forgot to subtract 1 from the incoming hull `handle' --- qw/source/sv_pr_cmds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qw/source/sv_pr_cmds.c b/qw/source/sv_pr_cmds.c index 2a5dab84d..3d65499b5 100644 --- a/qw/source/sv_pr_cmds.c +++ b/qw/source/sv_pr_cmds.c @@ -1837,10 +1837,10 @@ PF_getboxhull (progs_t *pr) static void PF_freeboxhull (progs_t *pr) { - int h = G_INT (pr, OFS_PARM0); + int h = G_INT (pr, OFS_PARM0) - 1; hull_t *hull = &pf_hull_list[h]; - if (h < 1 || h > MAX_PF_HULLS + if (h < 0 || h > MAX_PF_HULLS - 1 || hull->clipnodes != pf_clipnodes[h] || hull->planes != pf_planes[h]) PR_RunError (pr, "PF_freeboxhull: invalid box hull handle\n"); @@ -1852,7 +1852,7 @@ PF_freeboxhull (progs_t *pr) static void PF_rotate_bbox (progs_t *pr) { - int h = G_INT (pr, OFS_PARM0); + int h = G_INT (pr, OFS_PARM0) - 1; float *angles = G_VECTOR (pr, OFS_PARM1); float *mins = G_VECTOR (pr, OFS_PARM2); float *maxs = G_VECTOR (pr, OFS_PARM3);