| 249 | } |
| 250 | |
| 251 | static void TriggerUPVMist(long x, long y, long z, long velocity, short angle) |
| 252 | { |
| 253 | auto* sptr = GetFreeParticle(); |
| 254 | |
| 255 | sptr->on = 1; |
| 256 | sptr->sR = 0; |
| 257 | sptr->sG = 0; |
| 258 | sptr->sB = 0; |
| 259 | |
| 260 | sptr->dR = 64; |
| 261 | sptr->dG = 64; |
| 262 | sptr->dB = 64; |
| 263 | |
| 264 | sptr->colFadeSpeed = 4 + (GetRandomControl() & 3); |
| 265 | sptr->fadeToBlack = 12; |
| 266 | sptr->sLife = sptr->life = (GetRandomControl() & 3) + 20; |
| 267 | sptr->blendMode = BlendMode::Additive; |
| 268 | sptr->extras = 0; |
| 269 | sptr->dynamic = -1; |
| 270 | |
| 271 | sptr->x = x + ((GetRandomControl() & 15) - 8); |
| 272 | sptr->y = y + ((GetRandomControl() & 15) - 8); |
| 273 | sptr->z = z + ((GetRandomControl() & 15) - 8); |
| 274 | long zv = velocity * phd_cos(angle) / 4; |
| 275 | long xv = velocity * phd_sin(angle) / 4; |
| 276 | sptr->xVel = xv + ((GetRandomControl() & 127) - 64); |
| 277 | sptr->yVel = 0; |
| 278 | sptr->zVel = zv + ((GetRandomControl() & 127) - 64); |
| 279 | sptr->friction = 3; |
| 280 | |
| 281 | if (GetRandomControl() & 1) |
| 282 | { |
| 283 | sptr->flags = SP_SCALE | SP_DEF | SP_ROTATE | SP_EXPDEF; |
| 284 | sptr->rotAng = GetRandomControl() & 4095; |
| 285 | |
| 286 | if (GetRandomControl() & 1) |
| 287 | sptr->rotAdd = -(GetRandomControl() & 15) - 16; |
| 288 | else |
| 289 | sptr->rotAdd = (GetRandomControl() & 15) + 16; |
| 290 | } |
| 291 | else |
| 292 | sptr->flags = SP_SCALE | SP_DEF | SP_EXPDEF; |
| 293 | |
| 294 | sptr->scalar = 3; |
| 295 | sptr->gravity = sptr->maxYvel = 0; |
| 296 | long size = (GetRandomControl() & 7) + (velocity / 2) + 16; |
| 297 | sptr->size = sptr->sSize = size / 4; |
| 298 | sptr->dSize = size; |
| 299 | } |
| 300 | |
| 301 | void UPVEffects(short itemNumber) |
| 302 | { |
no test coverage detected