mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 21:35:21 +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();
|
$this->allowFlight = $this->isCreative();
|
||||||
if($this->isSpectator()){
|
if($this->isSpectator()){
|
||||||
$this->flying = true;
|
$this->flying = true;
|
||||||
|
$this->keepMovement = true;
|
||||||
$this->despawnFromAll();
|
$this->despawnFromAll();
|
||||||
}else{
|
}else{
|
||||||
|
$this->keepMovement = $this->allowMovementCheats;
|
||||||
if($this->isSurvival()){
|
if($this->isSurvival()){
|
||||||
$this->flying = false;
|
$this->flying = false;
|
||||||
}
|
}
|
||||||
@ -1902,6 +1904,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->allowFlight = $this->isCreative();
|
$this->allowFlight = $this->isCreative();
|
||||||
|
$this->keepMovement = $this->isSpectator() || $this->allowMovementCheats();
|
||||||
|
|
||||||
if(($level = $this->server->getLevelByName($this->namedtag->getString("Level", "", true))) === null){
|
if(($level = $this->server->getLevelByName($this->namedtag->getString("Level", "", true))) === null){
|
||||||
$this->setLevel($this->server->getDefaultLevel());
|
$this->setLevel($this->server->getDefaultLevel());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user