mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
arrow speed depends on how long were u using an item
This commit is contained in:
parent
78a19a7da6
commit
d8e242d0b5
3 changed files with 29 additions and 12 deletions
|
|
@ -70,6 +70,7 @@ class Entity extends Position
|
|||
public $random;
|
||||
public $radius;
|
||||
public $inAction = false;
|
||||
public $inActionCounter = 0;
|
||||
public $hasKnockback;
|
||||
public $hasJumped;
|
||||
public $invincible, $crouched, $fire, $health, $status;
|
||||
|
|
@ -499,6 +500,7 @@ class Entity extends Position
|
|||
if($this->closed === true){
|
||||
return false;
|
||||
}
|
||||
|
||||
$now = microtime(true);
|
||||
if($this->check === false){
|
||||
$this->lastUpdate = $now;
|
||||
|
|
@ -727,19 +729,27 @@ class Entity extends Position
|
|||
$hasUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($this->knockbackTime > 0){
|
||||
--$this->knockbackTime;
|
||||
}
|
||||
|
||||
if($this->moveTime > 0){
|
||||
-- $this->moveTime;
|
||||
--$this->moveTime;
|
||||
}
|
||||
if($this->lookTime > 0){
|
||||
-- $this->lookTime;
|
||||
--$this->lookTime;
|
||||
}
|
||||
if($this->idleTime > 0){
|
||||
-- $this->idleTime;
|
||||
--$this->idleTime;
|
||||
}
|
||||
|
||||
|
||||
if($this->inAction){
|
||||
++$this->inActionCounter;
|
||||
}
|
||||
|
||||
|
||||
if($this->lastHeadYaw != $this->headYaw){
|
||||
$this->sendHeadYaw();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue