This commit is contained in:
Daniel Maixner 2022-12-11 17:39:24 +01:00
parent d7701bc641
commit 727f0f8065
3 changed files with 6 additions and 4 deletions

View File

@ -98,7 +98,7 @@ final class Backtrack
}
/**
* @return int[]
* @return non-empty-array<int>
*/
public function getStates(): array
{

View File

@ -5,8 +5,10 @@ namespace cs\Core;
use cs\Enum\ArmorType;
use cs\Enum\HitBoxType;
use cs\Enum\ItemType;
use cs\Interface\AttackEnable;
use cs\Interface\HitIntersect;
use cs\Interface\Hittable;
use cs\Weapon\AmmoBasedWeapon;
use cs\Weapon\BaseWeapon;
use cs\Weapon\Knife;
@ -71,7 +73,7 @@ class HitBox implements Hittable
$hitBoxType = HitBoxType::BACK;
}
/** @var BaseWeapon $shootItem */
/** @var AttackEnable&BaseWeapon $shootItem */
$shootItem = $bullet->getShootItem();
$playerArmorType = $this->player->getArmorType();
$healthDamage = $shootItem->getDamageValue($hitBoxType, $playerArmorType);

View File

@ -143,7 +143,7 @@ class PerformanceTest extends BaseTest
{
////////
$range = 2000;
$tickCount = 4;
$tickCount = 8;
$playersCount = 10;
////////
@ -173,7 +173,7 @@ class PerformanceTest extends BaseTest
foreach ($players as $player) {
$this->assertGreaterThan(50, $player->getPositionImmutable()->z);
}
$this->assertLessThan(10, $took->asMilliseconds());
$this->assertLessThan(23, $took->asMilliseconds());
}
public function test3DMovement(): void