Implemented RakLib

This commit is contained in:
Shoghi Cervantes
2014-06-04 20:29:25 +02:00
parent cce9499a61
commit 99a0117a33
15 changed files with 429 additions and 1614 deletions

View File

@@ -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)]);
}
/**