Updated AnimatePacket with extra float handling

This commit is contained in:
Dylan K. Taylor 2017-04-20 15:39:12 +01:00
parent 6c5ca9b256
commit 5ce860c2f5

View File

@ -31,17 +31,23 @@ class AnimatePacket extends DataPacket{
public $action;
public $eid;
public $float; //Boat rowing time?
public function decode(){
$this->action = $this->getVarInt();
$this->eid = $this->getEntityRuntimeId();
//TODO: check extra float which appears when 0x80 bitflag is set
if($this->action & 0x80){
$this->float = $this->getLFloat();
}
}
public function encode(){
$this->reset();
$this->putVarInt($this->action);
$this->putEntityRuntimeId($this->eid);
if($this->action & 0x80){
$this->putLFloat($this->float);
}
}
public function handle(NetworkSession $session) : bool{