* Hide the number of lives you can steal if game-overed. It's not directly relevant unless you're game overed.
* Fix an issue where everyone being game overed except for one person, and then kicking that one person, meant the game over trigger was never met. * Fix an issue where the spectator text could be overridden with a count of the number of remaining players to complete the level. * Fixed a few glitches with spinning. (Unrelated to the branch, but exposed through new_coop testing.)
This commit is contained in:
parent
2bdf432703
commit
672bcc349c
20
src/p_mobj.c
20
src/p_mobj.c
|
@ -3041,6 +3041,15 @@ static void P_PlayerZMovement(mobj_t *mo)
|
||||||
|
|
||||||
if (mo->health && !mo->player->spectator && !P_CheckDeathPitCollide(mo))
|
if (mo->health && !mo->player->spectator && !P_CheckDeathPitCollide(mo))
|
||||||
{
|
{
|
||||||
|
if ((mo->player->charability2 == CA2_SPINDASH) && !(mo->player->pflags & PF_THOKKED) && (mo->player->cmd.buttons & BT_USE) && (FixedHypot(mo->momx, mo->momy) > (5*mo->scale)))
|
||||||
|
{
|
||||||
|
mo->player->pflags |= PF_SPINNING;
|
||||||
|
P_SetPlayerMobjState(mo, S_PLAY_ROLL);
|
||||||
|
S_StartSound(mo, sfx_spin);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
mo->player->pflags &= ~PF_SPINNING;
|
||||||
|
|
||||||
if (mo->player->pflags & PF_GLIDING) // ground gliding
|
if (mo->player->pflags & PF_GLIDING) // ground gliding
|
||||||
{
|
{
|
||||||
mo->player->skidtime = TICRATE;
|
mo->player->skidtime = TICRATE;
|
||||||
|
@ -3053,7 +3062,7 @@ static void P_PlayerZMovement(mobj_t *mo)
|
||||||
S_StartSound(mo, sfx_s3k8b);
|
S_StartSound(mo, sfx_s3k8b);
|
||||||
mo->player->pflags |= PF_FULLSTASIS;
|
mo->player->pflags |= PF_FULLSTASIS;
|
||||||
}
|
}
|
||||||
else if (mo->player->pflags & PF_JUMPED || (mo->player->pflags & (PF_SPINNING|PF_USEDOWN)) != (PF_SPINNING|PF_USEDOWN)
|
else if (mo->player->pflags & PF_JUMPED || !(mo->player->pflags & PF_SPINNING)
|
||||||
|| mo->player->powers[pw_tailsfly] || mo->state-states == S_PLAY_FLY_TIRED)
|
|| mo->player->powers[pw_tailsfly] || mo->state-states == S_PLAY_FLY_TIRED)
|
||||||
{
|
{
|
||||||
if (mo->player->cmomx || mo->player->cmomy)
|
if (mo->player->cmomx || mo->player->cmomy)
|
||||||
|
@ -3084,15 +3093,6 @@ static void P_PlayerZMovement(mobj_t *mo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mo->player->charability2 == CA2_SPINDASH) && !(mo->player->pflags & PF_THOKKED) && (mo->player->cmd.buttons & BT_USE) && (FixedHypot(mo->momx, mo->momy) > (5*mo->scale)))
|
|
||||||
{
|
|
||||||
mo->player->pflags |= PF_SPINNING;
|
|
||||||
P_SetPlayerMobjState(mo, S_PLAY_ROLL);
|
|
||||||
S_StartSound(mo, sfx_spin);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
mo->player->pflags &= ~PF_SPINNING;
|
|
||||||
|
|
||||||
if (!(mo->player->pflags & PF_GLIDING))
|
if (!(mo->player->pflags & PF_GLIDING))
|
||||||
mo->player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
mo->player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||||
|
|
||||||
|
|
41
src/p_user.c
41
src/p_user.c
|
@ -4837,7 +4837,7 @@ static void P_3dMovement(player_t *player)
|
||||||
angle_t dangle; // replaces old quadrants bits
|
angle_t dangle; // replaces old quadrants bits
|
||||||
fixed_t normalspd = FixedMul(player->normalspeed, player->mo->scale);
|
fixed_t normalspd = FixedMul(player->normalspeed, player->mo->scale);
|
||||||
boolean analogmove = false;
|
boolean analogmove = false;
|
||||||
boolean spin = (player->pflags & PF_SPINNING && (player->rmomx || player->rmomy) && !(player->pflags & PF_STARTDASH));
|
boolean spin = ((onground = P_IsObjectOnGround(player->mo)) && player->pflags & PF_SPINNING && (player->rmomx || player->rmomy) && !(player->pflags & PF_STARTDASH));
|
||||||
fixed_t oldMagnitude, newMagnitude;
|
fixed_t oldMagnitude, newMagnitude;
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
vector3_t totalthrust;
|
vector3_t totalthrust;
|
||||||
|
@ -4927,9 +4927,6 @@ static void P_3dMovement(player_t *player)
|
||||||
if (player->pflags & PF_SLIDING)
|
if (player->pflags & PF_SLIDING)
|
||||||
cmd->forwardmove = 0;
|
cmd->forwardmove = 0;
|
||||||
|
|
||||||
// Do not let the player control movement if not onground.
|
|
||||||
onground = P_IsObjectOnGround(player->mo);
|
|
||||||
|
|
||||||
player->aiming = cmd->aiming<<FRACBITS;
|
player->aiming = cmd->aiming<<FRACBITS;
|
||||||
|
|
||||||
// Set the player speeds.
|
// Set the player speeds.
|
||||||
|
@ -4990,10 +4987,7 @@ static void P_3dMovement(player_t *player)
|
||||||
if (spin) // Prevent gaining speed whilst rolling!
|
if (spin) // Prevent gaining speed whilst rolling!
|
||||||
{
|
{
|
||||||
const fixed_t ns = FixedDiv(549*ORIG_FRICTION,500*FRACUNIT); // P_XYFriction
|
const fixed_t ns = FixedDiv(549*ORIG_FRICTION,500*FRACUNIT); // P_XYFriction
|
||||||
if (onground)
|
topspeed = FixedMul(oldMagnitude, ns);
|
||||||
topspeed = FixedMul(oldMagnitude, ns);
|
|
||||||
else
|
|
||||||
topspeed = oldMagnitude;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Better maneuverability while flying
|
// Better maneuverability while flying
|
||||||
|
@ -5037,15 +5031,14 @@ static void P_3dMovement(player_t *player)
|
||||||
// allow very small movement while in air for gameplay
|
// allow very small movement while in air for gameplay
|
||||||
if (!onground)
|
if (!onground)
|
||||||
movepushforward >>= 2; // proper air movement
|
movepushforward >>= 2; // proper air movement
|
||||||
|
|
||||||
// Allow a bit of movement while spinning
|
// Allow a bit of movement while spinning
|
||||||
if (player->pflags & PF_SPINNING)
|
else if (player->pflags & PF_SPINNING)
|
||||||
{
|
{
|
||||||
if ((mforward && cmd->forwardmove > 0) || (mbackward && cmd->forwardmove < 0)
|
if ((mforward && cmd->forwardmove > 0) || (mbackward && cmd->forwardmove < 0)
|
||||||
|| (player->pflags & PF_STARTDASH))
|
|| (player->pflags & PF_STARTDASH))
|
||||||
movepushforward = 0;
|
movepushforward = 0;
|
||||||
else
|
else
|
||||||
movepushforward = FixedDiv(movepushforward, 16*FRACUNIT);
|
movepushforward >>= 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
movepushforward = FixedMul(movepushforward, player->mo->scale);
|
movepushforward = FixedMul(movepushforward, player->mo->scale);
|
||||||
|
@ -5077,17 +5070,14 @@ static void P_3dMovement(player_t *player)
|
||||||
// allow very small movement while in air for gameplay
|
// allow very small movement while in air for gameplay
|
||||||
if (!onground)
|
if (!onground)
|
||||||
movepushforward >>= 2; // proper air movement
|
movepushforward >>= 2; // proper air movement
|
||||||
|
|
||||||
// Allow a bit of movement while spinning
|
// Allow a bit of movement while spinning
|
||||||
if (player->pflags & PF_SPINNING)
|
else if (player->pflags & PF_SPINNING)
|
||||||
{
|
{
|
||||||
// Stupid little movement prohibitor hack
|
|
||||||
// that REALLY shouldn't belong in analog code.
|
|
||||||
if ((mforward && cmd->forwardmove > 0) || (mbackward && cmd->forwardmove < 0)
|
if ((mforward && cmd->forwardmove > 0) || (mbackward && cmd->forwardmove < 0)
|
||||||
|| (player->pflags & PF_STARTDASH))
|
|| (player->pflags & PF_STARTDASH))
|
||||||
movepushforward = 0;
|
movepushforward = 0;
|
||||||
else
|
else
|
||||||
movepushforward = FixedDiv(movepushforward, 16*FRACUNIT);
|
movepushforward >>= 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
movepushsideangle = controldirection;
|
movepushsideangle = controldirection;
|
||||||
|
@ -8198,6 +8188,10 @@ boolean P_GetLives(player_t *player)
|
||||||
static void P_ConsiderAllGone(void)
|
static void P_ConsiderAllGone(void)
|
||||||
{
|
{
|
||||||
INT32 i, lastdeadplayer = -1, deadtimercheck = INT32_MAX;
|
INT32 i, lastdeadplayer = -1, deadtimercheck = INT32_MAX;
|
||||||
|
|
||||||
|
if (countdown2)
|
||||||
|
return;
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
if (!playeringame[i])
|
if (!playeringame[i])
|
||||||
|
@ -8206,15 +8200,16 @@ static void P_ConsiderAllGone(void)
|
||||||
if (players[i].playerstate != PST_DEAD && !players[i].spectator && players[i].mo && players[i].mo->health)
|
if (players[i].playerstate != PST_DEAD && !players[i].spectator && players[i].mo && players[i].mo->health)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (players[i].lives > 0)
|
if (players[i].spectator)
|
||||||
|
{
|
||||||
|
if (lastdeadplayer == -1)
|
||||||
|
lastdeadplayer = i;
|
||||||
|
}
|
||||||
|
else if (players[i].lives > 0)
|
||||||
{
|
{
|
||||||
if (players[i].spectator && lastdeadplayer == -1)
|
|
||||||
;
|
|
||||||
else if (players[i].deadtimer < deadtimercheck)
|
|
||||||
deadtimercheck = players[i].deadtimer;
|
|
||||||
else
|
|
||||||
continue;
|
|
||||||
lastdeadplayer = i;
|
lastdeadplayer = i;
|
||||||
|
if (players[i].deadtimer < deadtimercheck)
|
||||||
|
deadtimercheck = players[i].deadtimer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -761,6 +761,7 @@ static void ST_drawLives(void)
|
||||||
va("%d",sum));
|
va("%d",sum));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if 0 // render the number of lives you COULD steal
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
INT32 i, sum = 0;
|
INT32 i, sum = 0;
|
||||||
|
@ -781,6 +782,7 @@ static void ST_drawLives(void)
|
||||||
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANSHALF|v_splitflag, va("/%d",sum));
|
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANSHALF|v_splitflag, va("/%d",sum));
|
||||||
}
|
}
|
||||||
// intentional fallthrough
|
// intentional fallthrough
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
// don't return so the SP one can be drawn below
|
// don't return so the SP one can be drawn below
|
||||||
break;
|
break;
|
||||||
|
@ -1997,7 +1999,7 @@ static void ST_overlayDrawer(void)
|
||||||
|
|
||||||
if (!hu_showscores && (netgame || multiplayer) && displayplayer == consoleplayer)
|
if (!hu_showscores && (netgame || multiplayer) && displayplayer == consoleplayer)
|
||||||
{
|
{
|
||||||
if (stplyr->exiting && cv_playersforexit.value && gametype == GT_COOP)
|
if (!stplyr->spectator && stplyr->exiting && cv_playersforexit.value && gametype == GT_COOP)
|
||||||
{
|
{
|
||||||
INT32 i, total = 0, exiting = 0;
|
INT32 i, total = 0, exiting = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue