diff --git a/src/p_maputl.c b/src/p_maputl.c index 8fcd8f271..7a6af4d61 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -134,7 +134,7 @@ void P_ClosestPointOnLine3D(fixed_t x, fixed_t y, fixed_t z, line_t *line, verte // P_PointOnLineSide // Returns 0 or 1 // -INT32 P_PointOnLineSide(fixed_t x, fixed_t y, line_t *line) +PUREFUNC INT32 P_PointOnLineSide(fixed_t x, fixed_t y, const line_t *line) { const vertex_t *v1 = line->v1; fixed_t dx, dy, left, right; @@ -170,7 +170,7 @@ INT32 P_PointOnLineSide(fixed_t x, fixed_t y, line_t *line) // Considers the line to be infinite // Returns side 0 or 1, -1 if box crosses the line. // -INT32 P_BoxOnLineSide(fixed_t *tmbox, line_t *ld) +PUREFUNC INT32 P_BoxOnLineSide(fixed_t *tmbox, const line_t *ld) { INT32 p1, p2; @@ -220,7 +220,7 @@ INT32 P_BoxOnLineSide(fixed_t *tmbox, line_t *ld) // P_PointOnDivlineSide // Returns 0 or 1. // -static INT32 P_PointOnDivlineSide(fixed_t x, fixed_t y, divline_t *line) +static PUREFUNC INT32 P_PointOnDivlineSide(fixed_t x, fixed_t y, const divline_t *line) { fixed_t dx, dy, left, right; diff --git a/src/p_maputl.h b/src/p_maputl.h index ec4a4aa33..d2337d007 100644 --- a/src/p_maputl.h +++ b/src/p_maputl.h @@ -44,11 +44,11 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2, #define P_AproxDistance(dx, dy) FixedHypot(dx, dy) void P_ClosestPointOnLine(fixed_t x, fixed_t y, line_t *line, vertex_t *result); void P_ClosestPointOnLine3D(fixed_t x, fixed_t y, fixed_t z, line_t *line, vertex_t *result); -INT32 P_PointOnLineSide(fixed_t x, fixed_t y, line_t *line); +INT32 P_PointOnLineSide(fixed_t x, fixed_t y, const line_t *line); void P_MakeDivline(line_t *li, divline_t *dl); void P_CameraLineOpening(line_t *plinedef); fixed_t P_InterceptVector(divline_t *v2, divline_t *v1); -INT32 P_BoxOnLineSide(fixed_t *tmbox, line_t *ld); +INT32 P_BoxOnLineSide(fixed_t *tmbox, const line_t *ld); void P_UnsetPrecipThingPosition(precipmobj_t *thing); void P_SetPrecipitationThingPosition(precipmobj_t *thing); void P_CreatePrecipSecNodeList(precipmobj_t *thing, fixed_t x,fixed_t y);