Skip to content

Commit

Permalink
Try to mimic vanilla's allsolid behaviour a bit better, for rogue's l…
Browse files Browse the repository at this point in the history
…avamen.

# Conflicts:
#	Quake/world.c
  • Loading branch information
Shpoike authored and Novum committed Mar 27, 2022
1 parent 5caae12 commit 3007dc8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Quake/world.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,6 @@ static int Q1BSP_RecursiveHullTrace (struct rhtctx_s *ctx, int num, float p1f, f
}
else
{
trace->allsolid = false;
if (num == CONTENTS_EMPTY)
trace->inopen = true;
else if (num != CONTENTS_SOLID)
Expand Down Expand Up @@ -710,6 +709,7 @@ static int Q1BSP_RecursiveHullTrace (struct rhtctx_s *ctx, int num, float p1f, f
rht = Q1BSP_RecursiveHullTrace (ctx, node->children[side], p1f, midf, p1, mid, trace);
if (rht != rht_empty && !trace->allsolid)
return rht;
trace->allsolid = false;
rht = Q1BSP_RecursiveHullTrace (ctx, node->children[side ^ 1], midf, p2f, mid, p2, trace);
if (rht != rht_solid)
return rht;
Expand Down Expand Up @@ -900,13 +900,17 @@ qboolean SV_RecursiveHullCheck (hull_t *hull, vec3_t p1, vec3_t p2, trace_t *tra
}
else
{
qboolean ret;
struct rhtctx_s ctx;
VectorCopy (p1, ctx.start);
VectorCopy (p2, ctx.end);
ctx.clipnodes = hull->clipnodes;
ctx.planes = hull->planes;
ctx.hitcontents = hitcontents;
return Q1BSP_RecursiveHullTrace (&ctx, hull->firstclipnode, 0, 1, p1, p2, trace) != rht_impact;
ret = Q1BSP_RecursiveHullTrace (&ctx, hull->firstclipnode, 0, 1, p1, p2, trace) != rht_impact;
if (!trace->startsolid)
trace->allsolid = false;
return ret;
}
}

Expand Down

2 comments on commit 3007dc8

@temx
Copy link
Collaborator

@temx temx commented on 3007dc8 Mar 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this ended up getting reverted upstream: Shpoike/Quakespasm@0955d04
(I don't know what the "other issues" are, or whether they affect vkQuake)

@Novum
Copy link
Owner

@Novum Novum commented on 3007dc8 Mar 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see how it goes with 1.13 before reverting it. I think I initially didn't merge this because of this revert, I remember now.

Please sign in to comment.