From 691072c9461da0338f8f6a5b863a419a18471fa0 Mon Sep 17 00:00:00 2001 From: Dan Olson Date: Mon, 21 Mar 2011 03:49:58 -0700 Subject: [PATCH] More 64bit fixes --- base/p_enemy.c | 6 +++--- base/p_pspr.c | 6 +++--- include/doomdef.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/p_enemy.c b/base/p_enemy.c index f20d594..f1cb951 100644 --- a/base/p_enemy.c +++ b/base/p_enemy.c @@ -1201,7 +1201,7 @@ void A_MummyAttack2(mobj_t *actor) //mo = P_SpawnMissile(actor, actor->target, MT_EGGFX); if(mo != NULL) { - mo->special1 = (int)actor->target; + mo->special1 = (intptr_t)actor->target; } } @@ -1803,7 +1803,7 @@ void A_HeadAttack(mobj_t *actor) if(mo != NULL) { mo->z -= 32*FRACUNIT; - mo->special1 = (int)target; + mo->special1 = (intptr_t)target; mo->special2 = 50; // Timer for active sound mo->health = 20*TICSPERSEC; // Duration S_StartSound(actor, sfx_hedat3); @@ -2235,7 +2235,7 @@ void A_MakePod(mobj_t *actor) P_ThrustMobj(mo, P_Random()<<24, (fixed_t)(4.5*FRACUNIT)); S_StartSound(mo, sfx_newpod); actor->special1++; // Increment generated pod count - mo->special2 = (int)actor; // Link the generator to the pod + mo->special2 = (intptr_t)actor; // Link the generator to the pod return; } diff --git a/base/p_pspr.c b/base/p_pspr.c index 11f2622..e8a8871 100644 --- a/base/p_pspr.c +++ b/base/p_pspr.c @@ -1218,7 +1218,7 @@ void A_FireMacePL2(player_t *player, pspdef_t *psp) mo->momz = 2*FRACUNIT+((player->lookdir)<<(FRACBITS-5)); if(linetarget) { - mo->special1 = (int)linetarget; + mo->special1 = (intptr_t)linetarget; } } S_StartSound(player->mo, sfx_lobsht); @@ -1267,7 +1267,7 @@ void A_DeathBallImpact(mobj_t *ball) P_AimLineAttack(ball, angle, 10*64*FRACUNIT); if(linetarget && ball->target != linetarget) { - ball->special1 = (int)linetarget; + ball->special1 = (intptr_t)linetarget; angle = R_PointToAngle2(ball->x, ball->y, linetarget->x, linetarget->y); newAngle = true; @@ -1425,7 +1425,7 @@ void A_FireSkullRodPL2(player_t *player, pspdef_t *psp) } if(linetarget) { - MissileMobj->special1 = (int)linetarget; + MissileMobj->special1 = (intptr_t)linetarget; } S_StartSound(MissileMobj, sfx_hrnpow); } diff --git a/include/doomdef.h b/include/doomdef.h index 3c47f44..5225375 100644 --- a/include/doomdef.h +++ b/include/doomdef.h @@ -247,8 +247,8 @@ typedef struct mobj_s int damage; // For missiles int flags; int flags2; // Heretic flags - int special1; // Special info - int special2; // Special info + intptr_t special1; // Special info + intptr_t special2; // Special info int health; int movedir; // 0-7 int movecount; // when 0, select a new dir -- 2.39.2