.bool pushable;
.float anim_start_time; // reusing for bob waveform synchronisation
.vector angles_held; // reusing for (re)storing original angles
+.float wait, delay, pointtime; // reusing for despawn effects
void ItemDraw(entity this)
{
this.colormod = this.glowmod = autocvar_cl_ghost_items_color;
}
+ if(!this.alpha)
+ return;
+
+ // loot item despawn effects
+ if(this.ItemStatus & ITS_EXPIRING)
+ {
+ if(!this.wait) // when receiving the first message with ITS_EXPIRING set
+ {
+ this.wait = time + IT_DESPAWNFX_TIME; // it will despawn then
+ this.delay = 0.25;
+ }
+
+ if(autocvar_cl_items_animate & 2)
+ this.alpha *= (this.wait - time) / IT_DESPAWNFX_TIME;
+
+ if(autocvar_cl_items_animate & 4 && time >= this.pointtime)
+ {
+ pointparticles(EFFECT_ITEM_DESPAWN, this.origin + '0 0 16', '0 0 0', 1);
+ if (this.delay > 0.0625)
+ this.delay *= 0.5;
+ this.pointtime = time + this.delay;
+ }
+ }
+
this.drawmask = this.alpha <= 0 ? 0 : MASK_NORMAL;
}
EFFECT(0, ITEM_PICKUP, "item_pickup")
EFFECT(0, ITEM_RESPAWN, "item_respawn")
+EFFECT(0, ITEM_DESPAWN, "item_despawn")
EFFECT(0, ONS_GENERATOR_DAMAGED, "torch_small")
EFFECT(0, ONS_GENERATOR_GIB, "onslaught_generator_gib_explode")
MY(velocityjitter) = '0 0 256';
}
+// originally based on goldendust
+DEF(item_despawn);
+SUB(item_despawn) {
+ MY(type) = "snow";
+// MY(type) = "smoke";
+ MY(blend) = "add";
+ MY(alpha_min) = 192;
+ MY(alpha_max) = 256;
+ MY(alpha_fade) = 256;
+ MY(color_min) = "0xff9600";
+ MY(color_max) = "0xffefb8";
+ MY(count) = 32;
+ MY(originjitter) = '8 8 8';
+ MY(sizeincrease) = 1;
+ MY(size_min) = 0.5;
+ MY(size_max) = 1;
+ MY(tex_min) = 48;
+ MY(tex_max) = 55;
+ MY(velocityjitter) = '16 16 32';
+ MY(lightradius) = 48;
+ MY(lightradiusfade) 64;
+ MY(lightcolor) '1 0.75 0.36';
+ MY(lightshadow) 1;
+}
+
// always add new effects to the bottom of the list. And keep this comment in the bottom line of this file!