Adds a sphere lightning bolt
| 485 | } |
| 486 | // Adds a sphere lightning bolt |
| 487 | void AddProcSphereLightning(int handle, static_proc_element *proc) { |
| 488 | int procnum = proc - GameTextures[handle].procedural->static_proc_elements; |
| 489 | |
| 490 | if (Detail_settings.Procedurals_enabled) { |
| 491 | if (proc->frequency != 0 && ((FrameCount) % proc->frequency) != 0) |
| 492 | return; |
| 493 | } |
| 494 | float norm = ((float)proc->size / 255.0); |
| 495 | int len = norm * (float)PROC_SIZE; |
| 496 | len /= 2; |
| 497 | int dir = prand() * 2; |
| 498 | int dest_x = proc->x1 + (FixCos(dir) * (float)len); |
| 499 | int dest_y = proc->y1 + (FixSin(dir) * (float)len); |
| 500 | AddProcLightning(proc->x1, proc->y1, dest_x, dest_y, BRIGHT_COLOR, proc); |
| 501 | } |
| 502 | void AddProcRisingEmber(int handle, static_proc_element *proc) { |
| 503 | if (proc->frequency == 0 || (FrameCount % proc->frequency) == 0) { |
| 504 | // Add a new fizzle |
no test coverage detected