Player: add ability to get & set flight speed multiplier (#6076)

Since this doesn't directly correspond to flight speed (it's multiplied by different values depending on whether sprinting or not, and possibly other states), "multiplier" was preferred instead of directly calling it flight speed.

Default value is 0.05.
This commit is contained in:
Sergi del Olmo
2025-01-09 21:13:46 +01:00
committed by GitHub
parent 847ae26cad
commit f349ce75e4
2 changed files with 40 additions and 2 deletions

View File

@ -1058,8 +1058,7 @@ class NetworkSession{
];
$layers = [
//TODO: dynamic flying speed! FINALLY!!!!!!!!!!!!!!!!!
new AbilitiesLayer(AbilitiesLayer::LAYER_BASE, $boolAbilities, 0.05, 0.1),
new AbilitiesLayer(AbilitiesLayer::LAYER_BASE, $boolAbilities, $for->getFlightSpeedMultiplier(), 0.1),
];
if(!$for->hasBlockCollision()){
//TODO: HACK! In 1.19.80, the client starts falling in our faux spectator mode when it clips into a