| 582 | } |
| 583 | |
| 584 | void particle_cube(int type, int num, int fade, int x, int y) |
| 585 | { |
| 586 | sqr *s = S(x, y); |
| 587 | const int fc = s->ceil - s->floor + (s->vdelta + 3) / 4; |
| 588 | const float floor = s->floor - (s->type == FHF ? float(s->vdelta) / 4 : 0); |
| 589 | if(SOLID(s) || fc < 1) return; |
| 590 | loopi(num * fc / 12) |
| 591 | { |
| 592 | vec p(float(rnd(100)) / 100.0 + x, float(rnd(100)) / 100.0 + y, float(rnd(100) * fc) / 100 + floor), d(0, 0, 0); |
| 593 | newparticle(p, d, rnd(fade*3), type); |
| 594 | } |
| 595 | } |
| 596 | |
| 597 | VARP(maxtrail, 1, 500, 10000); |
| 598 |
no test coverage detected