feat: Reduce player vertical velocity after grappling and increase grappling hook projectile speed.
This commit is contained in:
parent
283961652c
commit
e6c35c5b1e
|
|
@ -58,6 +58,8 @@ class GrapplingItem : SpecialItem("grappling_hook") {
|
|||
val speed = 1.0 + (tier.level * 0.4)
|
||||
|
||||
val velocity = vector.normalize().multiply(speed)
|
||||
// 垂直方向の速度を抑制(上方向に飛びすぎるのを防ぐ)
|
||||
velocity.y = velocity.y * 0.5
|
||||
player.velocity = velocity
|
||||
|
||||
|
||||
|
|
@ -110,7 +112,8 @@ class GrapplingItem : SpecialItem("grappling_hook") {
|
|||
val shooter = projectile.shooter
|
||||
|
||||
if (shooter is org.bukkit.entity.Player) {
|
||||
projectile.velocity = projectile.velocity.add(shooter.velocity)
|
||||
// フックの飛行速度を上げる(1.8倍)+ プレイヤーの移動速度を加算
|
||||
projectile.velocity = projectile.velocity.multiply(1.8).add(shooter.velocity)
|
||||
|
||||
shooter.playSound(shooter.location, org.bukkit.Sound.ENTITY_FISHING_BOBBER_THROW, 1.0f, 0.8f)
|
||||
shooter.playSound(shooter.location, org.bukkit.Sound.ENTITY_ARROW_SHOOT, 0.5f, 1.2f)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user