From: terencehill Date: Sun, 29 Nov 2020 16:40:36 +0000 (+0100) Subject: Clear inventory on ready-restart X-Git-Tag: xonotic-v0.8.5~588^2~10 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e650a1566d21ad4f77b30fb6debf7e00716cc336;p=xonotic%2Fxonotic-data.pk3dir.git Clear inventory on ready-restart --- 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,