- A_SetPitch now clamps the player's pitch within the valid range. It can
be made to clamp other actors' pitches to within the range (-90,+90) degrees with the SPF_FORCECLAMP flag. - Transmit the local viewpitch limits to the other players. SVN r3323 (trunk)
This commit is contained in:
parent
0897a593c7
commit
b41dbf8a52
11 changed files with 63 additions and 13 deletions
|
|
@ -522,6 +522,14 @@ void APlayerPawn::PostBeginPlay()
|
|||
P_FindFloorCeiling(this, true);
|
||||
z = floorz;
|
||||
}
|
||||
else if (player - players == consoleplayer)
|
||||
{
|
||||
// Ask the local player's renderer what pitch restrictions
|
||||
// should be imposed and let everybody know.
|
||||
Net_WriteByte(DEM_SETPITCHLIMIT);
|
||||
Net_WriteByte(Renderer->GetMaxViewPitch(false)); // up
|
||||
Net_WriteByte(Renderer->GetMaxViewPitch(true)); // down
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
@ -2213,11 +2221,11 @@ void P_PlayerThink (player_t *player)
|
|||
player->mo->pitch -= look;
|
||||
if (look > 0)
|
||||
{ // look up
|
||||
player->mo->pitch = MAX(player->mo->pitch, Renderer->GetMaxViewPitch(false));
|
||||
player->mo->pitch = MAX(player->mo->pitch, player->MinPitch);
|
||||
}
|
||||
else
|
||||
{ // look down
|
||||
player->mo->pitch = MIN(player->mo->pitch, Renderer->GetMaxViewPitch(true));
|
||||
player->mo->pitch = MIN(player->mo->pitch, player->MaxPitch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue