diff --git a/Config/vehicles.xml b/Config/vehicles.xml index b50c056..271bfba 100644 --- a/Config/vehicles.xml +++ b/Config/vehicles.xml @@ -2,8 +2,8 @@ @@ -108,15 +108,11 @@ - - - - diff --git a/HarmonySrc/BoneSteedEnginePatch.cs b/HarmonySrc/BoneSteedEnginePatch.cs index a811a32..5efde16 100644 --- a/HarmonySrc/BoneSteedEnginePatch.cs +++ b/HarmonySrc/BoneSteedEnginePatch.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using HarmonyLib; namespace NecromancerTome @@ -11,40 +10,16 @@ namespace NecromancerTome /// ходу. Заведённый с пустым баком мотор так и работал на полной тяге. Здесь: без крови мотор /// не заводится, кончилась на ходу - глохнет; вставили сферу, сидя в седле, - заводится сам. /// Без мотора у ванили остаётся тяга x50 - еле ползёт, как пустой мотоцикл. - /// - «ЗВУК МОТОЦИКЛА УБРАТЬ, ПУСТЬ БУДЕТ ВЕЛОСИПЕД». Все звуки мотора (заводка, глушение, - /// обороты) у скакуна молчат; вместо них на ходу под тягой - стук педалей bicycle_pedal с - /// ритмом ванильного велосипеда (VPPedals: 0.75 с, на турбо 0.55 с). Деталь Pedals ванили - /// не годится - ей нужны шатун и педали в модели. + /// - «ЗВУК МОТОЦИКЛА УБРАТЬ». Все звуки мотора (заводка, глушение, обороты) у скакуна + /// молчат - слышно только то, что слышно у мотоцикла с пустым баком (колёса). Стук педалей + /// пробовали - «тоже не нужен» (01.10). /// Дым и огонь (розовые кубы - частицы без материалов) убраны в vehicles.xml и префабе. /// public static class BoneSteedEngine { - public const string PedalSound = "bicycle_pedal"; - static readonly Dictionary pedalTimers = new Dictionary(); - public static bool Is(VehiclePart part) => part?.vehicle != null && BoneSteed.Is(part.vehicle.entity); public static bool HasBlood(Vehicle v) => BoneSteedFuel.FuelOf(v) > 0f; - - public static void Pedal(VPEngine engine, float dt) - { - Vehicle v = engine.vehicle; - EntityVehicle e = v.entity; - if (e == null || e.isEntityRemote || !e.HasDriver || !engine.isRunning || - v.CurrentMotorTorquePercent <= 0f || v.CurrentForwardVelocity <= 0.3f) - { - pedalTimers.Remove(e != null ? e.entityId : 0); - return; - } - pedalTimers.TryGetValue(e.entityId, out float t); - t += dt; - if (t > (v.IsTurbo ? 0.55f : 0.75f)) - { - e.PlayOneShot(PedalSound); - t = 0f; - } - pedalTimers[e.entityId] = t; - } } [HarmonyPatch(typeof(VPEngine), nameof(VPEngine.startEngine))] @@ -67,7 +42,6 @@ namespace NecromancerTome __instance.stopEngine(true); else if (!__instance.isRunning && blood && v.entity.HasDriver && !__instance.IsBroken()) __instance.startEngine(); - BoneSteedEngine.Pedal(__instance, _dt); } } diff --git a/NecromancerHarmony.dll b/NecromancerHarmony.dll index eabad4f..a5e562c 100644 Binary files a/NecromancerHarmony.dll and b/NecromancerHarmony.dll differ diff --git a/NecromancerHarmony.pdb b/NecromancerHarmony.pdb index 5cb6e64..3356950 100644 Binary files a/NecromancerHarmony.pdb and b/NecromancerHarmony.pdb differ