mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
fixed min speed, item throwing should be smoother
This commit is contained in:
parent
a6f2c7e257
commit
f8c3f9cae3
3 changed files with 5 additions and 5 deletions
|
|
@ -1331,7 +1331,7 @@ class Player{
|
|||
if(EventHandler::callEvent(new DataPacketReceiveEvent($this, $packet)) === BaseEvent::DENY){
|
||||
return;
|
||||
}
|
||||
ConsoleAPI::debug("Got packet: {$packet->pid()}");
|
||||
|
||||
switch($packet->pid()){
|
||||
case 0x01:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ class Entity extends Position
|
|||
|
||||
const TYPE = - 1;
|
||||
const CLASS_TYPE = - 1;
|
||||
const MIN_POSSIBLE_SPEED = 1/400; //anything below will send 0 to player
|
||||
const MIN_POSSIBLE_SPEED = 1/8000; //anything below will send 0 to player
|
||||
public $counter = 0;
|
||||
public $fallDistance = 0;
|
||||
public static $updateOnTick, $allowedAI;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ class SetEntityMotionPacket extends RakNetDataPacket{
|
|||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putInt($this->eid);
|
||||
$this->putShort((int) ($this->speedX * 400));
|
||||
$this->putShort((int) ($this->speedY * 400));
|
||||
$this->putShort((int) ($this->speedZ * 400));
|
||||
$this->putShort((int) ($this->speedX * 8000));
|
||||
$this->putShort((int) ($this->speedY * 8000));
|
||||
$this->putShort((int) ($this->speedZ * 8000));
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue