mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Correct some oversights where drawangle was incorrectly ignored.
This commit is contained in:
parent
460632ad3b
commit
eac36e73a3
3 changed files with 32 additions and 22 deletions
|
@ -5977,7 +5977,7 @@ void A_MixUp(mobj_t *actor)
|
|||
else if (numplayers == 2) // Special case -- simple swap
|
||||
{
|
||||
fixed_t x, y, z;
|
||||
angle_t angle;
|
||||
angle_t angle, drawangle;
|
||||
INT32 one = -1, two = 0; // default value 0 to make the compiler shut up
|
||||
|
||||
// Zoom tube stuff
|
||||
|
@ -6027,6 +6027,7 @@ void A_MixUp(mobj_t *actor)
|
|||
y = players[one].mo->y;
|
||||
z = players[one].mo->z;
|
||||
angle = players[one].mo->angle;
|
||||
drawangle = players[one].drawangle;
|
||||
|
||||
starpostx = players[one].starpostx;
|
||||
starposty = players[one].starposty;
|
||||
|
@ -6042,10 +6043,14 @@ void A_MixUp(mobj_t *actor)
|
|||
players[two].starpostnum, players[two].starposttime, players[two].starpostangle,
|
||||
players[two].mo->flags2);
|
||||
|
||||
players[one].drawangle = players[two].drawangle;
|
||||
|
||||
P_MixUp(players[two].mo, x, y, z, angle, starpostx, starposty, starpostz,
|
||||
starpostnum, starposttime, starpostangle,
|
||||
mflags2);
|
||||
|
||||
players[two].drawangle = drawangle;
|
||||
|
||||
//carry set after mixup. Stupid P_ResetPlayer() takes away some of the stuff we look for...
|
||||
//but not all of it! So we need to make sure they aren't set wrong or anything.
|
||||
players[one].powers[pw_carry] = carry2;
|
||||
|
@ -6057,7 +6062,7 @@ void A_MixUp(mobj_t *actor)
|
|||
else
|
||||
{
|
||||
fixed_t position[MAXPLAYERS][3];
|
||||
angle_t anglepos[MAXPLAYERS];
|
||||
angle_t anglepos[MAXPLAYERS][2];
|
||||
INT32 pindex[MAXPLAYERS], counter = 0, teleportfrom = 0;
|
||||
|
||||
// Zoom tube stuff
|
||||
|
@ -6076,7 +6081,7 @@ void A_MixUp(mobj_t *actor)
|
|||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
position[i][0] = position[i][1] = position[i][2] = anglepos[i] = pindex[i] = -1;
|
||||
position[i][0] = position[i][1] = position[i][2] = anglepos[i][0] = anglepos[i][1] = pindex[i] = -1;
|
||||
teleported[i] = false;
|
||||
}
|
||||
|
||||
|
@ -6092,7 +6097,8 @@ void A_MixUp(mobj_t *actor)
|
|||
position[counter][1] = players[i].mo->y;
|
||||
position[counter][2] = players[i].mo->z;
|
||||
pindex[counter] = i;
|
||||
anglepos[counter] = players[i].mo->angle;
|
||||
anglepos[counter][0] = players[i].mo->angle;
|
||||
anglepos[counter][1] = players[i].drawangle;
|
||||
players[i].mo->momx = players[i].mo->momy = players[i].mo->momz =
|
||||
players[i].rmomx = players[i].rmomy = 1;
|
||||
players[i].cmomx = players[i].cmomy = 0;
|
||||
|
@ -6144,11 +6150,13 @@ void A_MixUp(mobj_t *actor)
|
|||
players[i].speed = transspeed[teleportfrom];
|
||||
P_SetTarget(&players[i].mo->tracer, transtracer[teleportfrom]);
|
||||
|
||||
P_MixUp(players[i].mo, position[teleportfrom][0], position[teleportfrom][1], position[teleportfrom][2], anglepos[teleportfrom],
|
||||
P_MixUp(players[i].mo, position[teleportfrom][0], position[teleportfrom][1], position[teleportfrom][2], anglepos[teleportfrom][0],
|
||||
spposition[teleportfrom][0], spposition[teleportfrom][1], spposition[teleportfrom][2],
|
||||
starpostnum[teleportfrom], starposttime[teleportfrom], starpostangle[teleportfrom],
|
||||
flags2[teleportfrom]);
|
||||
|
||||
players[i].drawangle = anglepos[teleportfrom][1];
|
||||
|
||||
//...carry after. same reasoning.
|
||||
players[i].powers[pw_carry] = transcarry[teleportfrom];
|
||||
|
||||
|
|
|
@ -4514,7 +4514,7 @@ DoneSection2:
|
|||
break;
|
||||
}
|
||||
|
||||
player->mo->angle = lineangle;
|
||||
player->mo->angle = player->drawangle = lineangle;
|
||||
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
{
|
||||
|
|
|
@ -130,7 +130,7 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
|
|||
if (!dontstopmove)
|
||||
thing->momx = thing->momy = thing->momz = 0;
|
||||
else // Change speed to match direction
|
||||
P_InstaThrust(thing, thing->angle, P_AproxDistance(thing->momx, thing->momy));
|
||||
P_InstaThrust(thing, angle, FixedHypot(thing->momx, thing->momy));
|
||||
|
||||
if (thing->player)
|
||||
{
|
||||
|
@ -139,21 +139,6 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
|
|||
else
|
||||
thing->player->viewz = thing->z + thing->player->viewheight;
|
||||
|
||||
if (!dontstopmove)
|
||||
thing->reactiontime = TICRATE/2; // don't move for about half a second
|
||||
|
||||
// absolute angle position
|
||||
if (thing->player == &players[consoleplayer])
|
||||
localangle = angle;
|
||||
if (thing->player == &players[secondarydisplayplayer])
|
||||
localangle2 = angle;
|
||||
|
||||
// move chasecam at new player location
|
||||
if (splitscreen && camera2.chase && thing->player == &players[secondarydisplayplayer])
|
||||
P_ResetCamera(thing->player, &camera2);
|
||||
else if (camera.chase && thing->player == &players[displayplayer])
|
||||
P_ResetCamera(thing->player, &camera);
|
||||
|
||||
// don't run in place after a teleport
|
||||
if (!dontstopmove)
|
||||
{
|
||||
|
@ -171,7 +156,24 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
|
|||
thing->player->speed = 0;
|
||||
P_ResetPlayer(thing->player);
|
||||
P_SetPlayerMobjState(thing, S_PLAY_STND);
|
||||
|
||||
thing->reactiontime = TICRATE/2; // don't move for about half a second
|
||||
thing->player->drawangle = angle;
|
||||
}
|
||||
else
|
||||
thing->player->drawangle += (angle - thing->angle);
|
||||
|
||||
// absolute angle position
|
||||
if (thing->player == &players[consoleplayer])
|
||||
localangle = angle;
|
||||
if (thing->player == &players[secondarydisplayplayer])
|
||||
localangle2 = angle;
|
||||
|
||||
// move chasecam at new player location
|
||||
if (splitscreen && camera2.chase && thing->player == &players[secondarydisplayplayer])
|
||||
P_ResetCamera(thing->player, &camera2);
|
||||
else if (camera.chase && thing->player == &players[displayplayer])
|
||||
P_ResetCamera(thing->player, &camera);
|
||||
|
||||
if (flash)
|
||||
P_FlashPal(thing->player, PAL_MIXUP, 10);
|
||||
|
|
Loading…
Reference in a new issue