* Updated to ZDoom 4136:

- Fixed: spynext/prev were unreliable with player prediction.
- Fixed: The changemap CCMD did not work for maps not defined by MAPINFO.
- Fixed: When adding a forwardmove value, P_Bob() needs to do the same pitch-dependent scaling   as P_ForwardThrust().
- Changed the "notrelevant" checks in R_RenderMaskedSegRange() to not include equality in their   comparison operators. Fixes one map (http://forum.zdoom.org/viewtopic.php?f=2&t=34082); might   break others. Maybe. [This does not concern the OpenGL renderer.]
- Fixed: info CCMD listed bounce flags twice, under separate names.
- Skip the MF2_PASSMOBJ height checks in PIT_CheckThing() for ripper missiles.
- Fixed: Because P_OpenMapData() now reopens the containing file for the map, P_LoadGLNodes() needs a new check for if the map came from a regular wad.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1527 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
gez 2013-02-14 10:28:14 +00:00
parent f8da6b2de2
commit a6b89e2b6a
11 changed files with 46 additions and 28 deletions

View file

@ -1579,8 +1579,16 @@ void P_ForwardThrust (player_t *player, angle_t angle, fixed_t move)
// reduced at a regular rate, even on ice (where the player coasts).
//
void P_Bob (player_t *player, angle_t angle, fixed_t move)
void P_Bob (player_t *player, angle_t angle, fixed_t move, bool forward)
{
if (forward
&& (player->mo->waterlevel || (player->mo->flags & MF_NOGRAVITY))
&& player->mo->pitch != 0)
{
angle_t pitch = (angle_t)player->mo->pitch >> ANGLETOFINESHIFT;
move = FixedMul (move, finecosine[pitch]);
}
angle >>= ANGLETOFINESHIFT;
player->velx += FixedMul(move, finecosine[angle]);
@ -1773,8 +1781,8 @@ void P_MovePlayer (player_t *player)
fm = FixedMul (fm, player->mo->Speed);
sm = FixedMul (sm, player->mo->Speed);
// When crouching speed and bobbing have to be reduced
if (player->morphTics==0 && player->crouchfactor != FRACUNIT)
// When crouching, speed and bobbing have to be reduced
if (player->morphTics == 0 && player->crouchfactor != FRACUNIT)
{
fm = FixedMul(fm, player->crouchfactor);
sm = FixedMul(sm, player->crouchfactor);
@ -1786,12 +1794,12 @@ void P_MovePlayer (player_t *player)
if (forwardmove)
{
P_Bob (player, mo->angle, (cmd->ucmd.forwardmove * bobfactor) >> 8);
P_Bob (player, mo->angle, (cmd->ucmd.forwardmove * bobfactor) >> 8, true);
P_ForwardThrust (player, mo->angle, forwardmove);
}
if (sidemove)
{
P_Bob (player, mo->angle-ANG90, (cmd->ucmd.sidemove * bobfactor) >> 8);
P_Bob (player, mo->angle-ANG90, (cmd->ucmd.sidemove * bobfactor) >> 8, false);
P_SideThrust (player, mo->angle, sidemove);
}
@ -2569,9 +2577,14 @@ void P_UnPredictPlayer ()
if (player->cheats & CF_PREDICTING)
{
AActor *act = player->mo;
AActor *savedcamera = player->camera;
*player = PredictionPlayerBackup;
// Restore the camera instead of using the backup's copy, because spynext/prev
// could cause it to change during prediction.
player->camera = savedcamera;
act->UnlinkFromWorld ();
memcpy (&act->x, PredictionActorBackup, sizeof(AActor)-((BYTE *)&act->x-(BYTE *)act));