mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Use keepMovement in spectator and when movement anti-cheat is disabled
this makes it much less expensive for players to move around when anti-cheat is disabled. And let's be honest... who uses this shit anyway
This commit is contained in:
parent
a8ad956b29
commit
d2416d335e
@ -1292,8 +1292,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
$this->allowFlight = $this->isCreative();
|
||||
if($this->isSpectator()){
|
||||
$this->flying = true;
|
||||
$this->keepMovement = true;
|
||||
$this->despawnFromAll();
|
||||
}else{
|
||||
$this->keepMovement = $this->allowMovementCheats;
|
||||
if($this->isSurvival()){
|
||||
$this->flying = false;
|
||||
}
|
||||
@ -1902,6 +1904,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
}
|
||||
|
||||
$this->allowFlight = $this->isCreative();
|
||||
$this->keepMovement = $this->isSpectator() || $this->allowMovementCheats();
|
||||
|
||||
if(($level = $this->server->getLevelByName($this->namedtag->getString("Level", "", true))) === null){
|
||||
$this->setLevel($this->server->getDefaultLevel());
|
||||
|
Loading…
x
Reference in New Issue
Block a user