From 06790ce0cdfeff84b8a92ede5c03cfd48342fcb4 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 24 Oct 2008 18:03:18 +0000 Subject: Further fixes to stop lumps being modified. Subversion-branch: /branches/raven-branch Subversion-revision: 1363 --- src/heretic/p_setup.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/heretic') diff --git a/src/heretic/p_setup.c b/src/heretic/p_setup.c index 8e93fe04..ed45353a 100644 --- a/src/heretic/p_setup.c +++ b/src/heretic/p_setup.c @@ -268,6 +268,7 @@ void P_LoadThings(int lump) { byte *data; int i; + mapthing_t spawnthing; mapthing_t *mt; int numthings; @@ -277,12 +278,12 @@ void P_LoadThings(int lump) mt = (mapthing_t *) data; for (i = 0; i < numthings; i++, mt++) { - mt->x = SHORT(mt->x); - mt->y = SHORT(mt->y); - mt->angle = SHORT(mt->angle); - mt->type = SHORT(mt->type); - mt->options = SHORT(mt->options); - P_SpawnMapThing(mt); + spawnthing.x = SHORT(mt->x); + spawnthing.y = SHORT(mt->y); + spawnthing.angle = SHORT(mt->angle); + spawnthing.type = SHORT(mt->type); + spawnthing.options = SHORT(mt->options); + P_SpawnMapThing(&spawnthing); } W_ReleaseLumpNum(lump); @@ -424,6 +425,7 @@ void P_LoadBlockMap(int lump) lumplen = W_LumpLength(lump); blockmaplump = Z_Malloc(lumplen, PU_LEVEL, NULL); + W_ReadLump(lump, blockmaplump); blockmap = blockmaplump + 4; // Swap all short integers to native byte ordering: -- cgit v1.2.3