WriteShort(MSG_ENTITY, compressShortVector(this.dest));
WriteShort(MSG_ENTITY, this.count);
WriteByte(MSG_ENTITY, this.cnt);
+ WriteShort(MSG_ENTITY, bound(0, this.fade_end, 32767));
return true;
}
Net_LinkEntity(this, false, 0, rainsnow_SendEntity);
}
#elif defined(CSQC)
-float autocvar_cl_rainsnow_maxdrawdist = 500;
+float autocvar_cl_rainsnow_maxdrawdist = 1000;
void Draw_RainSnow(entity this)
{
- vector maxdist = '1 1 1' * autocvar_cl_rainsnow_maxdrawdist;
+ float drawdist = ((this.fade_end) ? this.fade_end : autocvar_cl_rainsnow_maxdrawdist);
+ vector maxdist = '1 1 1' * drawdist;
vector effbox_min = vec_to_max(view_origin - maxdist, this.origin + this.mins);
vector effbox_max = vec_to_min(view_origin + maxdist, this.origin + this.maxs);
this.velocity = decompressShortVector(ReadShort());
this.count = ReadShort();
this.glow_color = ReadByte(); // color
+ this.fade_end = ReadShort();
return = true;
this.maxs = 0.5 * this.maxs;
this.origin = this.origin - this.mins;
+ this.solid = SOLID_NOT; // before setorigin/setsize to prevent area grid linking
setorigin(this, this.origin);
setsize(this, this.mins, this.maxs);
- this.solid = SOLID_NOT;
if (isnew) IL_PUSH(g_drawables, this);
this.draw = Draw_RainSnow;
}