summaryrefslogtreecommitdiff
path: root/src/hexen/p_map.c
diff options
context:
space:
mode:
authorSimon Howard2011-09-25 23:46:08 +0000
committerSimon Howard2011-09-25 23:46:08 +0000
commitfcb27f12ee85d068e6b07fccc102ddf70c153c1f (patch)
treed2a5a3f36cfda24ed9262ae67943bba8d8fecbe1 /src/hexen/p_map.c
parent0ea5739881d540d5e5d8007917ee7e17d68a57be (diff)
downloadchocolate-doom-fcb27f12ee85d068e6b07fccc102ddf70c153c1f.tar.gz
chocolate-doom-fcb27f12ee85d068e6b07fccc102ddf70c153c1f.tar.bz2
chocolate-doom-fcb27f12ee85d068e6b07fccc102ddf70c153c1f.zip
Fix special1/special2 values in Hexen code so that they can properly
hold pointer values. Subversion-branch: /branches/v2-branch Subversion-revision: 2407
Diffstat (limited to 'src/hexen/p_map.c')
-rw-r--r--src/hexen/p_map.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/hexen/p_map.c b/src/hexen/p_map.c
index da5c8824..ddf9c0e4 100644
--- a/src/hexen/p_map.c
+++ b/src/hexen/p_map.c
@@ -410,13 +410,13 @@ boolean PIT_CheckThing(mobj_t * thing)
if (thing->flags2 & MF2_REFLECTIVE
&& (thing->player || thing->flags2 & MF2_BOSS))
{
- tmthing->special1 = (int) tmthing->target;
+ tmthing->special1.m = tmthing->target;
tmthing->target = thing;
return true;
}
if (thing->flags & MF_COUNTKILL || thing->player)
{
- tmthing->special1 = (int) thing;
+ tmthing->special1.m = thing;
}
if (P_Random() < 96)
{
@@ -447,7 +447,7 @@ boolean PIT_CheckThing(mobj_t * thing)
}
if (thing->health <= 0)
{
- tmthing->special1 = 0;
+ tmthing->special1.i = 0;
}
}
return true;
@@ -549,16 +549,15 @@ boolean PIT_CheckThing(mobj_t * thing)
}
if (tmthing->type == MT_LIGHTNING_FLOOR)
{
- if (tmthing->special2
- && !((mobj_t *) tmthing->special2)->special1)
+ if (tmthing->special2.m
+ && !tmthing->special2.m->special1.m)
{
- ((mobj_t *) tmthing->special2)->special1 =
- (int) thing;
+ tmthing->special2.m->special1.m = thing;
}
}
- else if (!tmthing->special1)
+ else if (!tmthing->special1.m)
{
- tmthing->special1 = (int) thing;
+ tmthing->special1.m = thing;
}
}
return true; // lightning zaps through all sprites
@@ -569,21 +568,20 @@ boolean PIT_CheckThing(mobj_t * thing)
if (thing->flags & MF_SHOOTABLE && thing != tmthing->target)
{
- lmo = (mobj_t *) tmthing->special2;
+ lmo = tmthing->special2.m;
if (lmo)
{
if (lmo->type == MT_LIGHTNING_FLOOR)
{
- if (lmo->special2
- && !((mobj_t *) lmo->special2)->special1)
+ if (lmo->special2.m
+ && !lmo->special2.m->special1.m)
{
- ((mobj_t *) lmo->special2)->special1 =
- (int) thing;
+ lmo->special2.m->special1.m = thing;
}
}
- else if (!lmo->special1)
+ else if (!lmo->special1.m)
{
- lmo->special1 = (int) thing;
+ lmo->special1.m = thing;
}
if (!(leveltime & 3))
{