From: bones_was_here Date: Sun, 11 Jun 2023 17:09:52 +0000 (+1000) Subject: items: don't precache 3d models and textures when simple items are enabled X-Git-Tag: xonotic-v0.8.6~7^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e9a12973bad78d9c87dab26cdd2e6fd23c0578b0;p=xonotic%2Fxonotic-data.pk3dir.git items: don't precache 3d models and textures when simple items are enabled Precaching is done in CSQC. Doing it in SVQC _StartItem() was unreliable on dedicated servers because clients often connected well after the items spawned in SVQC. Helps towards #2799 --- diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index d9ddce275..6633c54f2 100644 --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@ -1194,7 +1194,8 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default } // we should be sure this item will spawn before loading its assets - precache_model(this.model); + // CSQC handles model precaching: it may not use this model (eg simple items) and may not have connected yet + //precache_model(this.mdl); precache_sound(this.item_pickupsound); setItemGroup(this);