]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Nerf bullet impulses (#14145)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Thu, 23 Feb 2023 01:37:57 +0000 (12:37 +1100)
committerGitHub <noreply@github.com>
Thu, 23 Feb 2023 01:37:57 +0000 (12:37 +1100)
Content.Server/Weapons/Ranged/Systems/GunSystem.cs
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs

index cf4d6c7f8b548ab96e65c4d411ff9eb88ae4baf2..f5c9b31ccc9141c01725a89b18f768f2fcaff3b7 100644 (file)
@@ -38,7 +38,7 @@ public sealed partial class GunSystem : SharedGunSystem
     [Dependency] private readonly StunSystem _stun = default!;
     [Dependency] private readonly IAdminLogManager _adminLogger = default!;
 
-    public const float DamagePitchVariation = MeleeWeaponSystem.DamagePitchVariation;
+    public const float DamagePitchVariation = SharedMeleeWeaponSystem.DamagePitchVariation;
     public const float GunClumsyChance = 0.5f;
 
     public override void Initialize()
index 056ee83168688aa92d352091eee7b2acc77dec05..55e2dbfd9cb73f25d648926b3b9c137b1f4fd070 100644 (file)
@@ -40,18 +40,18 @@ public abstract partial class SharedGunSystem : EntitySystem
     [Dependency] protected readonly IRobustRandom Random = default!;
     [Dependency] protected readonly ISharedAdminLogManager Logs = default!;
     [Dependency] protected readonly DamageableSystem Damageable = default!;
-    [Dependency] private readonly SharedGravitySystem Gravity = default!;
+    [Dependency] protected readonly ExamineSystemShared Examine = default!;
     [Dependency] private   readonly ItemSlotsSystem _slots = default!;
     [Dependency] protected readonly SharedActionsSystem Actions = default!;
     [Dependency] protected readonly SharedAppearanceSystem Appearance = default!;
     [Dependency] private   readonly SharedCombatModeSystem _combatMode = default!;
     [Dependency] protected readonly SharedContainerSystem Containers = default!;
-    [Dependency] protected readonly ExamineSystemShared Examine = default!;
     [Dependency] protected readonly SharedPhysicsSystem Physics = default!;
     [Dependency] protected readonly SharedPopupSystem PopupSystem = default!;
     [Dependency] protected readonly ThrowingSystem ThrowingSystem = default!;
     [Dependency] protected readonly TagSystem TagSystem = default!;
     [Dependency] protected readonly SharedAudioSystem Audio = default!;
+    [Dependency] private   readonly SharedGravitySystem _gravity = default!;
     [Dependency] protected readonly SharedProjectileSystem Projectiles = default!;
 
     protected ISawmill Sawmill = default!;
@@ -301,7 +301,7 @@ public abstract partial class SharedGunSystem : EntitySystem
         // Projectiles cause impulses especially important in non gravity environments
         if (TryComp<PhysicsComponent>(user, out var userPhysics))
         {
-            if (Gravity.IsWeightless(user, userPhysics))
+            if (_gravity.IsWeightless(user, userPhysics))
                 CauseImpulse(fromCoordinates, toCoordinates.Value, userPhysics);
         }
         Dirty(gun);
@@ -391,7 +391,7 @@ public abstract partial class SharedGunSystem : EntitySystem
         var toMap = toCoordinates.ToMapPos(EntityManager);
         var shotDirection = (toMap - fromMap).Normalized;
 
-        const float impulseStrength = 85.0f; //The bullet impulse strength, TODO: In the future we might want to make it more projectile dependent
+        const float impulseStrength = 5.0f;
         var impulseVector =  shotDirection * impulseStrength;
         Physics.ApplyLinearImpulse(userPhysics.Owner, -impulseVector, body: userPhysics);
     }