]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/electro.qc
Create the LimitedElectroBallRubbleList intrusive list only when needed, CasingsNGibs...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / electro.qc
index 79cfa5ebf9fe124988afddc909cb0f4ba5a7a1aa..589cf9c773521d534c147d7a33104750945ff5bb 100644 (file)
@@ -422,6 +422,8 @@ void W_Electro_Attack_Orb(Weapon thiswep, entity actor, .entity weaponentity)
 
        if(WEP_CVAR_SEC(electro, limit) > 0)
        {
+               if (!LimitedElectroBallRubbleList)
+                       LimitedElectroBallRubbleList = IL_NEW();
                ListNewChildRubble(LimitedElectroBallRubbleList, proj);
                LimitedChildrenRubble(LimitedElectroBallRubbleList, "electro_orb", WEP_CVAR_SEC(electro, limit), adaptor_think2use_hittype_splash, actor);
        }