Don't weight down by shockwave if having positive vertical momentum

This commit is contained in:
DBotThePony 2022-09-24 18:14:46 +07:00
parent ab7473db6c
commit c7dad0a48c
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -34,7 +34,7 @@ class ShockwaveFeature(capability: MatteryPlayerCapability) : AndroidSwitchableF
private set
override fun tickClient() {
if (isActive && ply.isSteppingCarefully && cooldown <= 0 && android.androidEnergy.extractEnergyInnerExact(ServerConfig.Shockwave.ENERGY_COST, true).isPositive) {
if (isActive && ply.isSteppingCarefully && cooldown <= 0 && android.androidEnergy.extractEnergyInnerExact(ServerConfig.Shockwave.ENERGY_COST, true).isPositive && ply.deltaMovement.y < -0.01) {
ply.deltaMovement += Vector(0.0, -ServerConfig.Shockwave.ACCELERATION / 20.0, 0.0)
}