- Fixed SetActorPitch and ChangeActorPitch issue.
The code did not take into account the player's limited pitch.
This commit is contained in:
parent
0b3a22d6d2
commit
4546df7dc3
3 changed files with 19 additions and 19 deletions
|
|
@ -3989,23 +3989,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetPitch)
|
|||
return;
|
||||
}
|
||||
|
||||
if (ref->player != NULL || (flags & SPF_FORCECLAMP))
|
||||
{ // clamp the pitch we set
|
||||
int min, max;
|
||||
|
||||
if (ref->player != NULL)
|
||||
{
|
||||
min = ref->player->MinPitch;
|
||||
max = ref->player->MaxPitch;
|
||||
}
|
||||
else
|
||||
{
|
||||
min = -ANGLE_90 + (1 << ANGLETOFINESHIFT);
|
||||
max = ANGLE_90 - (1 << ANGLETOFINESHIFT);
|
||||
}
|
||||
pitch = clamp<int>(pitch, min, max);
|
||||
}
|
||||
ref->SetPitch(pitch, !!(flags & SPF_INTERPOLATE));
|
||||
ref->SetPitch(pitch, !!(flags & SPF_INTERPOLATE), !!(flags & SPF_FORCECLAMP));
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue