From 1eb99bb4bf9f319005c1569f901d4704b5baf7a5 Mon Sep 17 00:00:00 2001 From: Daniel Maixner Date: Sun, 1 Oct 2023 12:30:19 +0200 Subject: [PATCH] Fix scopeLevel reset on roundEnd --- server/src/Core/Item.php | 2 +- server/src/Equipment/Bomb.php | 1 + server/src/Weapon/AmmoBasedWeapon.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/Core/Item.php b/server/src/Core/Item.php index f6ed2da..1b63193 100644 --- a/server/src/Core/Item.php +++ b/server/src/Core/Item.php @@ -42,7 +42,7 @@ public function canBeEquipped(): bool public function reset(): void { - // empty hook + $this->scopeLevel = 0; } public function isUserDroppable(): bool diff --git a/server/src/Equipment/Bomb.php b/server/src/Equipment/Bomb.php index 95d1e20..a81808d 100644 --- a/server/src/Equipment/Bomb.php +++ b/server/src/Equipment/Bomb.php @@ -41,6 +41,7 @@ public function getSlot(): InventorySlot public function reset(): void { + parent::reset(); $this->plantTickCount = 0; $this->defuseTickCount = 0; } diff --git a/server/src/Weapon/AmmoBasedWeapon.php b/server/src/Weapon/AmmoBasedWeapon.php index dc06ac1..4e6bd54 100644 --- a/server/src/Weapon/AmmoBasedWeapon.php +++ b/server/src/Weapon/AmmoBasedWeapon.php @@ -42,6 +42,7 @@ public function unEquip(): void public function reset(): void { + parent::reset(); $this->ammo = static::magazineCapacity; $this->ammoReserve = static::reserveAmmo; $this->reloading = false;