mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-24 21:49:43 +00:00
sneaking fix
This commit is contained in:
parent
d02c98b2b3
commit
64151dcad0
4 changed files with 12 additions and 6 deletions
|
|
@ -733,7 +733,7 @@ class Entity extends Position{
|
|||
|
||||
public function inBlock(Vector3 $block, $radius = 0.8){
|
||||
$me = new Vector3($this->x - 0.5, $this->y, $this->z - 0.5);
|
||||
if(($block->y == ((int) $this->y) or $block->y == (((int) $this->y) + 1)) and $block->maxPlainDistance($me) < $radius){
|
||||
if(($block->y == (ceil($this->y)) or $block->y == (ceil($this->y) + 1)) and $block->maxPlainDistance($me) < $radius){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,13 @@ abstract class ProtocolInfo{
|
|||
//const PLAYER_INPUT_PACKET = 0xb9;
|
||||
|
||||
}
|
||||
|
||||
/*Unused:
|
||||
* 0xb5
|
||||
* 0xb9
|
||||
* 0x96
|
||||
* 0x17
|
||||
* 0x14
|
||||
*/
|
||||
/***REM_START***/
|
||||
require_once(FILE_PATH . "src/network/raknet/RakNetDataPacket.php");
|
||||
/***REM_END***/
|
||||
|
|
@ -39,8 +39,8 @@ class Random{
|
|||
$s = $v1 * $v1 + $v2 * $v2;
|
||||
}while($s >= 1 || $s == 0);
|
||||
$multiplier = sqrt(-2 * log($s) / $s);
|
||||
$nextNextGaussian = $v2 * $multiplier;
|
||||
$haveNextNextGaussian = true;
|
||||
$this->nextNextGaussian = $v2 * $multiplier;
|
||||
$this->haveNextNextGaussian = true;
|
||||
return $v1 * $multiplier;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue