From e650a1566d21ad4f77b30fb6debf7e00716cc336 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 29 Nov 2020 17:40:36 +0100 Subject: [PATCH] Clear inventory on ready-restart --- qcsrc/server/command/vote.qc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index e3347980d..7b3818f74 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -349,6 +349,18 @@ void reset_map(bool dorespawn) shuffleteams(); shuffleteams_on_reset_map = false; } + + FOREACH_CLIENT(IS_PLAYER(it), + { + entity store = PS(it); + if (store) + { + for (int j = 0; j < REGISTRY_COUNT(Items); j++) + store.inventory.inv_items[j] = 0; + Inventory_update(store); + } + }); + MUTATOR_CALLHOOK(reset_map_global); FOREACH_ENTITY_FLOAT_ORDERED(pure_data, false, -- 2.39.2