Add setting

This commit is contained in:
in0finite 2019-05-24 23:38:19 +02:00
parent 6cca13e705
commit 2c60eef867

View file

@ -74,6 +74,12 @@ namespace SanAndreasUnity.Settings {
setValue = (value) => { VehicleManager.Instance.controlWheelsOnLocalPlayer = value; },
persistType = OptionsWindow.InputPersistType.OnStart
};
OptionsWindow.BoolInput m_controlVehicleInputOnLocalPlayer = new OptionsWindow.BoolInput ("Control vehicle input on local player") {
isAvailable = () => VehicleManager.Instance != null,
getValue = () => VehicleManager.Instance.controlInputOnLocalPlayer,
setValue = (value) => { VehicleManager.Instance.controlInputOnLocalPlayer = value; },
persistType = OptionsWindow.InputPersistType.OnStart
};
OptionsWindow.BoolInput m_disableVehiclesRigidBodyOnClients = new OptionsWindow.BoolInput ("Disable vehicle's rigid body on clients") {
isAvailable = () => VehicleManager.Instance != null,
getValue = () => VehicleManager.Instance.disableRigidBodyOnClients,
@ -100,8 +106,8 @@ namespace SanAndreasUnity.Settings {
var inputs = new OptionsWindow.Input[] { m_timeScaleInput, m_gravityInput, m_displayHealthBarsInput, m_displayMinimapInput,
m_runInBackgroundInput, m_drawLineFromGunInput, m_enableCamera,
m_vehicleSyncRate, m_syncVehicleTransformUsingSyncVars, m_syncVehiclesLinearVelocity,
m_syncVehiclesAngularVelocity, m_controlWheelsOnLocalPlayer, m_disableVehiclesRigidBodyOnClients,
m_syncPedTransformWhileInVehicle,
m_syncVehiclesAngularVelocity, m_controlWheelsOnLocalPlayer, m_controlVehicleInputOnLocalPlayer,
m_disableVehiclesRigidBodyOnClients, m_syncPedTransformWhileInVehicle,
};
foreach (var input in inputs)