- //if(autocvar_cl_rainsnow_maxdrawdist <= 0 || vdist(vec2(this.origin) - vec2(this.absmin + this.absmax * 0.5), <=, autocvar_cl_rainsnow_maxdrawdist))
- te_particlerain(effbox_min, effbox_max, this.velocity, floor(mycount * drawframetime + random()), this.glow_color);
-}
-
-void Draw_Snow(entity this)
-{
- vector maxdist = '1 1 1' * autocvar_cl_rainsnow_maxdrawdist;
-
- 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);
-
- vector mysize = effbox_min + effbox_max;
- float mycount = bound(1, 0.1 * this.count * (mysize.x / 1024) * (mysize.y / 1024), 65535);
- //LOG_INFO(ftos(mycount));
-
- if(boxesoverlap(view_origin - maxdist, view_origin + maxdist, this.absmin, this.absmax))
- //if(autocvar_cl_rainsnow_maxdrawdist <= 0 || vdist(vec2(this.origin) - vec2(this.absmin + this.absmax * 0.5), <=, autocvar_cl_rainsnow_maxdrawdist))
- te_particlesnow(effbox_min, effbox_max, this.velocity, floor(mycount * drawframetime + random()), this.glow_color);
+ {
+ if(this.state == RAINSNOW_RAIN)
+ te_particlerain(effbox_min, effbox_max, this.velocity, floor(mycount * drawframetime + random()), this.glow_color);
+ else
+ te_particlesnow(effbox_min, effbox_max, this.velocity, floor(mycount * drawframetime + random()), this.glow_color);
+ }