From 717ca7f67c77b09c9fc6f36936fbc6bdc4ff8e98 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 26 Sep 2008 16:25:24 +0000 Subject: Fix up Heretic code for mmaped WAD I/O. Call W_ReleaseLump* instead of Z_Free/Z_ChangeTag. Subversion-branch: /branches/raven-branch Subversion-revision: 1288 --- src/heretic/r_plane.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/heretic/r_plane.c') diff --git a/src/heretic/r_plane.c b/src/heretic/r_plane.c index 28c109a4..8c56dad5 100644 --- a/src/heretic/r_plane.c +++ b/src/heretic/r_plane.c @@ -379,6 +379,7 @@ void R_DrawPlanes(void) visplane_t *pl; int light; int x, stop; + int lumpnum; int angle; byte *tempSource; @@ -454,8 +455,9 @@ void R_DrawPlanes(void) // // regular flat // - tempSource = W_CacheLumpNum(firstflat + - flattranslation[pl->picnum], PU_STATIC); + lumpnum = firstflat + flattranslation[pl->picnum]; + + tempSource = W_CacheLumpNum(lumpnum, PU_STATIC); switch (pl->special) { @@ -512,6 +514,6 @@ void R_DrawPlanes(void) R_MakeSpans(x, pl->top[x - 1], pl->bottom[x - 1], pl->top[x], pl->bottom[x]); - Z_ChangeTag(tempSource, PU_CACHE); + W_ReleaseLumpNum(lumpnum); } } -- cgit v1.2.3