redirect shungite to player target; resolves #16

controller-support
HumanoidSandvichDispenser 2023-08-31 12:19:50 -07:00
parent 5ef3229e93
commit b1a1b4dfc4
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
1 changed files with 1 additions and 2 deletions

View File

@ -69,8 +69,7 @@ public partial class ShungiteSpike : Projectile
// spawn a dart towards where the player is aiming // spawn a dart towards where the player is aiming
if (inflictor is Characters.Player player) if (inflictor is Characters.Player player)
{ {
var mousePos = GetGlobalMousePosition(); var dart = CreateDart(player.Target.Normalized());
var dart = CreateDart(GlobalPosition.DirectionTo(mousePos));
dart.Hitbox.Faction = player.Faction; dart.Hitbox.Faction = player.Faction;
Hitbox.IsDisabled = true; Hitbox.IsDisabled = true;
} }