From 529f5af6142f0f01d6bb979c6dbd35ef762a7ce0 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 23 Nov 2015 21:04:33 +0000 Subject: [PATCH] Removed a few old OpenGL-specific hacks that compensated for lack of dispoffset (I won't touch overlays for now) --- src/p_mobj.c | 26 ++------------------------ src/p_user.c | 25 +------------------------ 2 files changed, 3 insertions(+), 48 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index fd5b2d455..0f25a8655 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -5761,8 +5761,6 @@ static void P_NightsItemChase(mobj_t *thing) static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield) { - fixed_t destx, desty; - if (!thing->target || thing->target->health <= 0 || !thing->target->player || (thing->target->player->powers[pw_shield] & SH_NOSTACK) == SH_NONE || thing->target->player->powers[pw_super] || thing->target->player->powers[pw_invulnerability] > 1) @@ -5787,26 +5785,6 @@ static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield) return false; } - if (!splitscreen && rendermode != render_soft) - { - angle_t viewingangle; - - if (players[displayplayer].awayviewtics) - viewingangle = R_PointToAngle2(thing->target->x, thing->target->y, players[displayplayer].awayviewmobj->x, players[displayplayer].awayviewmobj->y); - else if (!camera.chase && players[displayplayer].mo) - viewingangle = R_PointToAngle2(thing->target->x, thing->target->y, players[displayplayer].mo->x, players[displayplayer].mo->y); - else - viewingangle = R_PointToAngle2(thing->target->x, thing->target->y, camera.x, camera.y); - - destx = thing->target->x + P_ReturnThrustX(thing->target, viewingangle, FixedMul(FRACUNIT, thing->scale)); - desty = thing->target->y + P_ReturnThrustY(thing->target, viewingangle, FixedMul(FRACUNIT, thing->scale)); - } - else - { - destx = thing->target->x; - desty = thing->target->y; - } - if (shield == SH_FORCE && thing->movecount != (thing->target->player->powers[pw_shield] & 0xFF)) { thing->movecount = (thing->target->player->powers[pw_shield] & 0xFF); @@ -5831,8 +5809,8 @@ static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield) P_SetScale(thing, thing->target->scale); P_UnsetThingPosition(thing); - thing->x = destx; - thing->y = desty; + thing->x = thing->target->x; + thing->y = thing->target->y; if (thing->eflags & MFE_VERTICALFLIP) thing->z = thing->target->z + thing->target->height - thing->height + FixedDiv(P_GetPlayerHeight(thing->target->player) - thing->target->height, 3*FRACUNIT) - FixedMul(2*FRACUNIT, thing->target->scale); else diff --git a/src/p_user.c b/src/p_user.c index d693cb277..9853aa137 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2120,30 +2120,7 @@ static void P_CheckInvincibilityTimer(player_t *player) player->mo->color = (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1))); else if (leveltime % (TICRATE/7) == 0) { - fixed_t destx, desty; - mobj_t *sparkle; - - if (!splitscreen && rendermode != render_soft) - { - angle_t viewingangle; - - if (players[displayplayer].awayviewtics) - viewingangle = R_PointToAngle2(player->mo->x, player->mo->y, players[displayplayer].awayviewmobj->x, players[displayplayer].awayviewmobj->y); - else if (!camera.chase && players[displayplayer].mo) - viewingangle = R_PointToAngle2(player->mo->x, player->mo->y, players[displayplayer].mo->x, players[displayplayer].mo->y); - else - viewingangle = R_PointToAngle2(player->mo->x, player->mo->y, camera.x, camera.y); - - destx = player->mo->x + P_ReturnThrustX(player->mo, viewingangle, FixedMul(FRACUNIT, player->mo->scale)); - desty = player->mo->y + P_ReturnThrustY(player->mo, viewingangle, FixedMul(FRACUNIT, player->mo->scale)); - } - else - { - destx = player->mo->x; - desty = player->mo->y; - } - - sparkle = P_SpawnMobj(destx, desty, player->mo->z, MT_IVSP); + mobj_t *sparkle = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_IVSP); sparkle->destscale = player->mo->scale; P_SetScale(sparkle, player->mo->scale); }