From 8546eecd6478794e7eb43c19f054ca475f3f5b2f Mon Sep 17 00:00:00 2001 From: Daniel Maixner Date: Thu, 29 Dec 2022 16:25:34 +0100 Subject: [PATCH] Fix few hitbox holes --- server/src/HitGeometry/HitBoxChest.php | 8 ++++++-- server/src/HitGeometry/HitBoxStomach.php | 6 ++++-- test/og/Shooting/PlayerKillTest.php | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/server/src/HitGeometry/HitBoxChest.php b/server/src/HitGeometry/HitBoxChest.php index 85dde6c..4b3c952 100644 --- a/server/src/HitGeometry/HitBoxChest.php +++ b/server/src/HitGeometry/HitBoxChest.php @@ -22,8 +22,10 @@ class HitBoxChest extends SphereGroupHitBox private function createChestLeft(): void { + $this->addHitBox(new Point(-12, -50, -1), 5); + $this->addHitBox(new Point(-12, -42, -1), 5); $this->addHitBox(new Point(-13, -46, 5), 6); - $this->addHitBox(new Point(-4, -45, 7), 6); + $this->addHitBox(new Point(-4, -43, 7), 6); $this->addHitBox(new Point(-13, -41, 3), 6); $this->addHitBox(new Point(-5, -37, 2), 6); $this->addHitBox(new Point(-15, -35, -1), 6); @@ -35,8 +37,10 @@ class HitBoxChest extends SphereGroupHitBox private function createChestRight(): void { + $this->addHitBox(new Point(12, -50, -1), 5); + $this->addHitBox(new Point(12, -42, -1), 5); $this->addHitBox(new Point(13, -46, 5), 6); - $this->addHitBox(new Point(4, -45, 7), 6); + $this->addHitBox(new Point(4, -43, 7), 6); $this->addHitBox(new Point(13, -41, 3), 6); $this->addHitBox(new Point(5, -37, 2), 6); $this->addHitBox(new Point(15, -35, -1), 6); diff --git a/server/src/HitGeometry/HitBoxStomach.php b/server/src/HitGeometry/HitBoxStomach.php index 105f989..4abbee3 100644 --- a/server/src/HitGeometry/HitBoxStomach.php +++ b/server/src/HitGeometry/HitBoxStomach.php @@ -24,11 +24,12 @@ class HitBoxStomach extends SphereGroupHitBox $this->addHitBox(new Point(-10, -65, 6), 6); $this->addHitBox(new Point(-10, -59, 6), 6); $this->addHitBox(new Point(-11, -52, 5), 6); + $this->addHitBox(new Point(-11, -58, 0), 4); $this->addHitBox(new Point(-2, -79, 10), 6); $this->addHitBox(new Point(-2, -69, 9), 6); $this->addHitBox(new Point(-3, -60, 8), 6); $this->addHitBox(new Point(-3, -52, 8), 6); - $this->addHitBox(new Point(-11, -78, 7), 6); + $this->addHitBox(new Point(-11, -78, 6), 6); } private function createFrontRight(): void @@ -37,11 +38,12 @@ class HitBoxStomach extends SphereGroupHitBox $this->addHitBox(new Point(10, -65, 6), 6); $this->addHitBox(new Point(10, -59, 6), 6); $this->addHitBox(new Point(11, -52, 5), 6); + $this->addHitBox(new Point(11, -58, 0), 4); $this->addHitBox(new Point(2, -79, 10), 6); $this->addHitBox(new Point(2, -69, 9), 6); $this->addHitBox(new Point(3, -60, 8), 6); $this->addHitBox(new Point(3, -52, 8), 6); - $this->addHitBox(new Point(11, -78, 7), 6); + $this->addHitBox(new Point(11, -78, 6), 6); } } diff --git a/test/og/Shooting/PlayerKillTest.php b/test/og/Shooting/PlayerKillTest.php index 7106a8c..887c7bb 100644 --- a/test/og/Shooting/PlayerKillTest.php +++ b/test/og/Shooting/PlayerKillTest.php @@ -138,7 +138,7 @@ class PlayerKillTest extends BaseTestCase public function testUspKillPlayerInThreeBulletsInChestWithNoKevlar(): void { $player2Commands = [ - fn(Player $p) => $p->getSight()->lookAt(180, 18), + fn(Player $p) => $p->getSight()->lookAt(180, 19), fn(Player $p) => $p->crouch(), $this->waitNTicks(max(Setting::tickCountCrouch(), PistolUsp::equipReadyTimeMs)), $this->endGame(),