mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
changes to skeleton ai, theoretical performance increase with huge amount of mobs and players
This commit is contained in:
parent
c9da91378d
commit
da28b3b0ff
9 changed files with 89 additions and 96 deletions
|
|
@ -7,6 +7,8 @@ class Entity extends Position
|
|||
const CLASS_TYPE = - 1;
|
||||
const MIN_POSSIBLE_SPEED = 1/8000; //anything below will send 0 to player
|
||||
|
||||
public $searchForClosestPlayers = false;
|
||||
|
||||
public $counter = 0;
|
||||
public $fallDistance = 0;
|
||||
public static $updateOnTick, $allowedAI;
|
||||
|
|
@ -186,7 +188,9 @@ class Entity extends Position
|
|||
$this->outOfWorld();
|
||||
}
|
||||
}
|
||||
|
||||
public function handlePrePlayerSearcher(){
|
||||
|
||||
}
|
||||
public function isType(){
|
||||
return in_array($this->type, func_get_args());
|
||||
}
|
||||
|
|
@ -715,6 +719,10 @@ class Entity extends Position
|
|||
return $this->y < -1.6;
|
||||
}
|
||||
|
||||
public function handlePlayerSearcher(Player $player, $dist){
|
||||
|
||||
}
|
||||
|
||||
public function update($now){
|
||||
if($this->closed === true){
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue