From: bones_was_here Date: Sun, 11 Jun 2023 17:53:44 +0000 (+1000) Subject: items: match SVQC .solid behaviour in CSQC X-Git-Tag: xonotic-v0.8.6~7^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8454c78f3a414770aeffea73466bb57d763ea064;p=xonotic%2Fxonotic-data.pk3dir.git items: match SVQC .solid behaviour in CSQC --- diff --git a/qcsrc/client/items/items.qc b/qcsrc/client/items/items.qc index 339e1428e..2fa911d44 100644 --- a/qcsrc/client/items/items.qc +++ b/qcsrc/client/items/items.qc @@ -249,11 +249,26 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew) else this.effects &= ~EF_FULLBRIGHT; - if(this.ItemStatus & ITS_GLOW) + if(this.ItemStatus & ITS_AVAILABLE) { - if(this.ItemStatus & ITS_AVAILABLE) + if(this.solid != SOLID_TRIGGER) + { + this.solid = SOLID_TRIGGER; + setorigin(this, this.origin); // link it to the area grid + } + + if(this.ItemStatus & ITS_GLOW) this.effects |= (EF_ADDITIVE | EF_FULLBRIGHT); - else + } + else + { + if(this.solid != SOLID_NOT) + { + this.solid = SOLID_NOT; + setorigin(this, this.origin); // optimisation: unlink it from the area grid + } + + if(this.ItemStatus & ITS_GLOW) this.effects &= ~(EF_ADDITIVE | EF_FULLBRIGHT); } } @@ -262,7 +277,6 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew) { if (isnew) IL_PUSH(g_drawables, this); this.draw = ItemDraw; - this.solid = SOLID_TRIGGER; //this.flags |= FL_ITEM; this.fade_end = ReadShort();