mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Implemented RakLib
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -204,7 +204,7 @@ class Level{
|
||||
public function useChunk($X, $Z, Player $player){
|
||||
$index = LevelFormat::getIndex($X, $Z);
|
||||
$this->loadChunk($X, $Z);
|
||||
$this->usedChunks[$index][$player->CID] = $player;
|
||||
$this->usedChunks[$index][spl_object_hash($player)] = $player;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -215,7 +215,7 @@ class Level{
|
||||
*/
|
||||
public function freeAllChunks(Player $player){
|
||||
foreach($this->usedChunks as $i => $c){
|
||||
unset($this->usedChunks[$i][$player->CID]);
|
||||
unset($this->usedChunks[$i][spl_object_hash($player)]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ class Level{
|
||||
* @param Player $player
|
||||
*/
|
||||
public function freeChunk($X, $Z, Player $player){
|
||||
unset($this->usedChunks[LevelFormat::getIndex($X, $Z)][$player->CID]);
|
||||
unset($this->usedChunks[LevelFormat::getIndex($X, $Z)][spl_object_hash($player)]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user