mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-16 16:15:24 +00:00
5260896313
fixes #578
21 lines
510 B
C#
21 lines
510 B
C#
using QSB.Messaging;
|
|
using QSB.Utility;
|
|
|
|
namespace QSB.Player.Messages;
|
|
|
|
internal class UpdateFOVMessage : QSBMessage<float>
|
|
{
|
|
static UpdateFOVMessage()
|
|
=> GlobalMessenger<GraphicSettings>.AddListener(
|
|
"GraphicSettingsUpdated",
|
|
(GraphicSettings settings) => new UpdateFOVMessage(settings.fieldOfView).Send());
|
|
|
|
private UpdateFOVMessage(float fov) : base(fov) { }
|
|
|
|
public override void OnReceiveRemote()
|
|
{
|
|
var player = QSBPlayerManager.GetPlayer(From);
|
|
player.Camera.fieldOfView = Data;
|
|
}
|
|
}
|