action void A_ZoomFactor(double zoom = 1, int flags = 0)
{
let player = self.player;
if (player != NULL && player.ReadyWeapon != NULL)
{
zoom = 1 / clamp(zoom, 0.1, 50.0);
if (flags & 1)
{ // Make the zoom instant.
self.player.FOV = self.player.DesiredFOV * zoom;
}
if (flags & 2)
{ // Disable pitch/yaw scaling.
zoom = -zoom;
}
self.player.ReadyWeapon.FOVScale = zoom;
}
}
if (flags & 2)
{ // Disable pitch/yaw scaling.
zoom = -zoom;
}
ZDoom Wiki wrote:ZOOM_NOSCALETURNING: Player turning is normally scaled as well by this function. Use this flag to retain the player's unzoomed sensitivity while zoomed.
// A negative scale is used to prevent G_AddViewAngle/G_AddViewPitch
// from scaling with the FOV scale.
desired *= abs(player.ReadyWeapon.FOVScale);
look = int(look * players[consoleplayer].ReadyWeapon->FOVScale);
yaw = int(yaw * players[consoleplayer].ReadyWeapon->FOVScale);
Caligari87 wrote:I'm pretty sure it's in virtual void MovePlayer() for angle and virtual void CheckPitch() for pitch (relevant line numbers linked). No idea if overriding those messes with prediction/interpolation at all.
Users browsing this forum: No registered users and 2 guests