ACS function: "SetPlayerWeaponZoomFactor" from Q-Zandronum
This backports the ACS function SetPlayerWeaponZoomFactor
from Q-Zandronum, the ACS-equivalent to the A_ZoomFactor
DECORATE function. The original commit can be found here: https://github.com/IgeNiaI/Q-Zandronum/commit/a34f5cf69286fef62da6d2b02fbdb0eda4b62317
Some changes had to be made to the original commit:
- Since
A_ZoomFactor
andSetPlayerWeaponZoomFactor
use the same code, I added a helper function so that both functions behave in the same way without any duplicated code (also important if the functions' behaviour changes in the future). - I replaced the "SetWeaponFovScale" server command from Q-Zandronum with "SetWeaponZoomFactor", also allowing the flags passed into the function (i.e.
ZOOM_INSTANT
and/orZOOM_NOSCALETURNING
) to be sent to clients, ensuring consistent behaviour in offline and online games.
Edited by Adam Kaminski