SERVER: Fix Mystery Box obtained status for host

This commit is contained in:
cypress 2023-10-30 13:26:41 -04:00
parent 9d4e39c0cb
commit 060b157a4c

View file

@ -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;
}