From 060b157a4cfbe651dddcdd7d9d8343b823cdf279 Mon Sep 17 00:00:00 2001 From: cypress Date: Mon, 30 Oct 2023 13:26:41 -0400 Subject: [PATCH] SERVER: Fix Mystery Box obtained status for host --- source/server/entities/mystery_box.qc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/server/entities/mystery_box.qc b/source/server/entities/mystery_box.qc index c96ab1d..ef766e2 100644 --- a/source/server/entities/mystery_box.qc +++ b/source/server/entities/mystery_box.qc @@ -623,12 +623,16 @@ void() mystery_box_tp_spot = void() MBOX_UpdatePosessionStatus = { + // Set all weapon statuses as unobtained. + for(float i = 0; i < MAX_BOX_WEAPONS; i++) { + mystery_box_weapons[i].already_obtained = false; + } + entity player = find(world, classname, "player"); while(player != world) { for(float i = 0; i < MAX_BOX_WEAPONS; i++) { float weapon_id = mystery_box_weapons[i].weapon_id; - mystery_box_weapons[i].already_obtained = false; if (Weapon_PlayerHasWeapon(player, weapon_id, true) && WepDef_OnlyOneAllowed(weapon_id)) { mystery_box_weapons[i].already_obtained = true; }