summaryrefslogtreecommitdiff
path: root/src/heretic/p_setup.c
diff options
context:
space:
mode:
authorSimon Howard2008-10-24 17:28:37 +0000
committerSimon Howard2008-10-24 17:28:37 +0000
commit80eacd13f9d4e7111893de511d0b5ecd5402ee74 (patch)
tree37d7cae2e314db08b32ed80062ca5a8235353332 /src/heretic/p_setup.c
parent8022c5cc09ecec5623449a2040672c1e331ac75e (diff)
downloadchocolate-doom-80eacd13f9d4e7111893de511d0b5ecd5402ee74.tar.gz
chocolate-doom-80eacd13f9d4e7111893de511d0b5ecd5402ee74.tar.bz2
chocolate-doom-80eacd13f9d4e7111893de511d0b5ecd5402ee74.zip
Fix Heretic/Hexen implementations of P_LoadBlockmap to not modify the
lump. Subversion-branch: /branches/raven-branch Subversion-revision: 1362
Diffstat (limited to 'src/heretic/p_setup.c')
-rw-r--r--src/heretic/p_setup.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/heretic/p_setup.c b/src/heretic/p_setup.c
index d27250c4..8e93fe04 100644
--- a/src/heretic/p_setup.c
+++ b/src/heretic/p_setup.c
@@ -419,10 +419,16 @@ void P_LoadSideDefs(int lump)
void P_LoadBlockMap(int lump)
{
int i, count;
+ int lumplen;
- blockmaplump = W_CacheLumpNum(lump, PU_LEVEL);
+ lumplen = W_LumpLength(lump);
+
+ blockmaplump = Z_Malloc(lumplen, PU_LEVEL, NULL);
blockmap = blockmaplump + 4;
- count = W_LumpLength(lump) / 2;
+
+ // Swap all short integers to native byte ordering:
+
+ count = lumplen / 2;
for (i = 0; i < count; i++)
blockmaplump[i] = SHORT(blockmaplump[i]);