mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Merge branch 'minor-next' into major-next
This commit is contained in:
commit
8e6c1762d7
@ -64,3 +64,10 @@ Released 6th May 2023.
|
|||||||
- This was caused by creating a new timings handler for each call, regardless of whether a timer already existed for the given event and callback.
|
- This was caused by creating a new timings handler for each call, regardless of whether a timer already existed for the given event and callback.
|
||||||
- Fixed `Full Server Tick` and other records being missing from timings reports.
|
- Fixed `Full Server Tick` and other records being missing from timings reports.
|
||||||
- This was caused by timings handler depth not getting reset when timings was disabled and later re-enabled.
|
- This was caused by timings handler depth not getting reset when timings was disabled and later re-enabled.
|
||||||
|
|
||||||
|
# 4.20.4
|
||||||
|
Released 6th May 2023.
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
- Fixed players being forced into flight mode in every game mode.
|
||||||
|
- Moral of the story: do not assume anything in Mojang internals does what its name suggests...
|
||||||
|
@ -923,20 +923,26 @@ class NetworkSession{
|
|||||||
AbilitiesLayer::ABILITY_PRIVILEGED_BUILDER => false,
|
AbilitiesLayer::ABILITY_PRIVILEGED_BUILDER => false,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$layers = [
|
||||||
|
//TODO: dynamic flying speed! FINALLY!!!!!!!!!!!!!!!!!
|
||||||
|
new AbilitiesLayer(AbilitiesLayer::LAYER_BASE, $boolAbilities, 0.05, 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
|
||||||
|
//block. We can't seem to prevent this short of forcing the player to always fly when block collision is
|
||||||
|
//disabled. Also, for some reason the client always reads flight state from this layer if present, even
|
||||||
|
//though the player isn't in spectator mode.
|
||||||
|
|
||||||
|
$layers[] = new AbilitiesLayer(AbilitiesLayer::LAYER_SPECTATOR, [
|
||||||
|
AbilitiesLayer::ABILITY_FLYING => true,
|
||||||
|
], null, null);
|
||||||
|
}
|
||||||
|
|
||||||
$this->sendDataPacket(UpdateAbilitiesPacket::create(new AbilitiesData(
|
$this->sendDataPacket(UpdateAbilitiesPacket::create(new AbilitiesData(
|
||||||
$isOp ? CommandPermissions::OPERATOR : CommandPermissions::NORMAL,
|
$isOp ? CommandPermissions::OPERATOR : CommandPermissions::NORMAL,
|
||||||
$isOp ? PlayerPermissions::OPERATOR : PlayerPermissions::MEMBER,
|
$isOp ? PlayerPermissions::OPERATOR : PlayerPermissions::MEMBER,
|
||||||
$for->getId(),
|
$for->getId(),
|
||||||
[
|
$layers
|
||||||
//TODO: dynamic flying speed! FINALLY!!!!!!!!!!!!!!!!!
|
|
||||||
new AbilitiesLayer(AbilitiesLayer::LAYER_BASE, $boolAbilities, 0.05, 0.1),
|
|
||||||
|
|
||||||
//TODO: HACK! In 1.19.80, the client starts falling in our faux spectator mode when it clips into a
|
|
||||||
//block. I have no idea why this works, since we don't actually use the real spectator mode.
|
|
||||||
new AbilitiesLayer(AbilitiesLayer::LAYER_SPECTATOR, [
|
|
||||||
AbilitiesLayer::ABILITY_FLYING => true,
|
|
||||||
], null, null)
|
|
||||||
]
|
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user