summaryrefslogtreecommitdiff
path: root/src/hexen/po_man.c
diff options
context:
space:
mode:
authorSimon Howard2008-10-24 18:03:18 +0000
committerSimon Howard2008-10-24 18:03:18 +0000
commit06790ce0cdfeff84b8a92ede5c03cfd48342fcb4 (patch)
tree23b8714145ed5a736142f5e419c3f614dcc8b12b /src/hexen/po_man.c
parent80eacd13f9d4e7111893de511d0b5ecd5402ee74 (diff)
downloadchocolate-doom-06790ce0cdfeff84b8a92ede5c03cfd48342fcb4.tar.gz
chocolate-doom-06790ce0cdfeff84b8a92ede5c03cfd48342fcb4.tar.bz2
chocolate-doom-06790ce0cdfeff84b8a92ede5c03cfd48342fcb4.zip
Further fixes to stop lumps being modified.
Subversion-branch: /branches/raven-branch Subversion-revision: 1363
Diffstat (limited to 'src/hexen/po_man.c')
-rw-r--r--src/hexen/po_man.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/hexen/po_man.c b/src/hexen/po_man.c
index ec5bb621..20da66e5 100644
--- a/src/hexen/po_man.c
+++ b/src/hexen/po_man.c
@@ -1435,6 +1435,7 @@ void PO_Init(int lump)
{
byte *data;
int i;
+ mapthing_t spawnthing;
mapthing_t *mt;
int numthings;
int polyIndex;
@@ -1449,32 +1450,34 @@ void PO_Init(int lump)
// Find the startSpot points, and spawn each polyobj
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);
+ spawnthing.x = SHORT(mt->x);
+ spawnthing.y = SHORT(mt->y);
+ spawnthing.angle = SHORT(mt->angle);
+ spawnthing.type = SHORT(mt->type);
// 3001 = no crush, 3002 = crushing
- if (mt->type == PO_SPAWN_TYPE || mt->type == PO_SPAWNCRUSH_TYPE)
+ if (spawnthing.type == PO_SPAWN_TYPE
+ || spawnthing.type == PO_SPAWNCRUSH_TYPE)
{ // Polyobj StartSpot Pt.
- polyobjs[polyIndex].startSpot.x = mt->x << FRACBITS;
- polyobjs[polyIndex].startSpot.y = mt->y << FRACBITS;
- SpawnPolyobj(polyIndex, mt->angle,
- (mt->type == PO_SPAWNCRUSH_TYPE));
+ polyobjs[polyIndex].startSpot.x = spawnthing.x << FRACBITS;
+ polyobjs[polyIndex].startSpot.y = spawnthing.y << FRACBITS;
+ SpawnPolyobj(polyIndex, spawnthing.angle,
+ (spawnthing.type == PO_SPAWNCRUSH_TYPE));
polyIndex++;
}
}
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);
- if (mt->type == PO_ANCHOR_TYPE)
+ spawnthing.x = SHORT(mt->x);
+ spawnthing.y = SHORT(mt->y);
+ spawnthing.angle = SHORT(mt->angle);
+ spawnthing.type = SHORT(mt->type);
+ if (spawnthing.type == PO_ANCHOR_TYPE)
{ // Polyobj Anchor Pt.
- TranslateToStartSpot(mt->angle, mt->x << FRACBITS,
- mt->y << FRACBITS);
+ TranslateToStartSpot(spawnthing.angle,
+ spawnthing.x << FRACBITS,
+ spawnthing.y << FRACBITS);
}
}
W_ReleaseLumpNum(lump);