]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
items: don't precache 3d models and textures when simple items are enabled
authorbones_was_here <bones_was_here@xonotic.au>
Sun, 11 Jun 2023 17:09:52 +0000 (03:09 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 15 Jun 2023 20:36:25 +0000 (06:36 +1000)
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

qcsrc/server/items/items.qc

index d9ddce2752ac3779ecb20a32ce230f842e0c3768..6633c54f286f1c48cb0e2b32eee8789dbab5e2f5 100644 (file)
@@ -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);