Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increases projectile speed and fixes projectiles inheriting velocity of the player #325

Merged
merged 3 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content.Server/Weapons/Ranged/Systems/GunSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public override void Shoot(EntityUid gunUid, GunComponent gun, List<(EntityUid?
// Update shot based on the recoil
toMap = fromMap.Position + angle.ToVec() * mapDirection.Length();
mapDirection = toMap - fromMap.Position;
var gunVelocity = Physics.GetMapLinearVelocity(gunUid);
var gunVelocity = Physics.GetMapLinearVelocity(fromEnt);

// I must be high because this was getting tripped even when true.
// DebugTools.Assert(direction != Vector2.Zero);
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Weapons/Ranged/Components/GunComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public sealed partial class GunComponent : Component
/// The base value for how fast the projectile moves.
/// </summary>
[DataField]
public float ProjectileSpeed = 25f;
public float ProjectileSpeed = 35f;

/// <summary>
/// How fast the projectile moves.
Expand Down
Loading