summaryrefslogtreecommitdiff
path: root/sys/src/games/doom/p_mobj.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-09-04 23:02:37 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-09-04 23:02:37 +0200
commit460f482ad05aeb12a7ed3bb92adeb03d8c6e4c0a (patch)
treec311e2d534a252e4ed88fcab8505063e3d43289f /sys/src/games/doom/p_mobj.c
parent3a322e9f329909c3c751de6cb5da33e7280c2738 (diff)
doom: fix alignment issues for arm
Diffstat (limited to 'sys/src/games/doom/p_mobj.c')
-rw-r--r--sys/src/games/doom/p_mobj.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/src/games/doom/p_mobj.c b/sys/src/games/doom/p_mobj.c
index 5e99700e3..8fcb4c1c5 100644
--- a/sys/src/games/doom/p_mobj.c
+++ b/sys/src/games/doom/p_mobj.c
@@ -396,7 +396,7 @@ P_NightmareRespawn (mobj_t* mobj)
// inherit attributes from deceased one
mo = P_SpawnMobj (x,y,z, mobj->type);
- mo->spawnpoint = mobj->spawnpoint;
+ memcpy (&mo->spawnpoint, mthing, sizeof(*mthing));
mo->angle = ANG45 * (mthing->angle/45);
if (mthing->options & MTF_AMBUSH)
@@ -552,7 +552,7 @@ void P_RemoveMobj (mobj_t* mobj)
&& (mobj->type != MT_INV)
&& (mobj->type != MT_INS))
{
- itemrespawnque[iquehead] = mobj->spawnpoint;
+ memcpy (&itemrespawnque[iquehead], &mobj->spawnpoint, sizeof(mobj->spawnpoint));
itemrespawntime[iquehead] = leveltime;
iquehead = (iquehead+1)&(ITEMQUESIZE-1);
@@ -625,7 +625,7 @@ void P_RespawnSpecials (void)
z = ONFLOORZ;
mo = P_SpawnMobj (x,y,z, i);
- mo->spawnpoint = *mthing;
+ memcpy (&mo->spawnpoint, mthing, sizeof(*mthing));
mo->angle = ANG45 * (mthing->angle/45);
// pull it from the que
@@ -728,10 +728,10 @@ void P_SpawnMapThing (mapthing_t* mthing)
}
// check for players specially
- if (mthing->type <= 4)
+ if (mthing->type <= MAXPLAYERS)
{
// save spots for respawning in network games
- playerstarts[mthing->type-1] = *mthing;
+ memcpy (&playerstarts[mthing->type-1], mthing, sizeof(*mthing));
if (!deathmatch)
P_SpawnPlayer (mthing);
@@ -784,7 +784,7 @@ void P_SpawnMapThing (mapthing_t* mthing)
z = ONFLOORZ;
mobj = P_SpawnMobj (x,y,z, i);
- mobj->spawnpoint = *mthing;
+ memcpy (&mobj->spawnpoint, mthing, sizeof(*mthing));
if (mobj->tics > 0)
mobj->tics = 1 + (P_Random () % mobj->tics);