mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
bow power algorithm is implemented(statically set to 1sec before launch now), direct arrow move updates sending
This commit is contained in:
parent
4de7707532
commit
78a19a7da6
2 changed files with 34 additions and 2 deletions
|
|
@ -41,7 +41,20 @@ class Arrow extends Projectile{
|
|||
$this->update();
|
||||
//TODO i guess? $ticksInGround = 0;
|
||||
}
|
||||
|
||||
public function sendMoveUpdate()
|
||||
{
|
||||
$pk = new MoveEntityPacket_PosRot();
|
||||
$pk->eid = $this->eid;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
$pk->yaw = $this->yaw;
|
||||
$pk->pitch = $this->pitch;
|
||||
|
||||
foreach($this->level->players as $p){ //sending packets directly makes movement less laggy
|
||||
$p->directDataPacket(clone $pk);
|
||||
}
|
||||
}
|
||||
public function update(){
|
||||
//parent::update();
|
||||
$this->needsUpdate = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue