Better speed measure

This commit is contained in:
Shoghi Cervantes Pueyo 2013-05-16 17:31:26 +02:00
parent 1dbbf08f1b
commit fceb076b9b

View File

@ -622,7 +622,7 @@ class Entity extends Position{
$this->speedY = $speedY; $this->speedY = $speedY;
$this->speedZ = $speedZ; $this->speedZ = $speedZ;
$this->speed = $origin->distance($final) / $diffTime; $this->speed = $origin->distance($final) / $diffTime;
array_shift($this->speedMeasure); unset($this->speedMeasure[key($this->speedMeasure)]);
$this->speedMeasure[] = $this->speed; $this->speedMeasure[] = $this->speed;
} }