Commit c30ce55
committed
Fix combining 3D shockwaves with framebuffer shockwaves.
If framebuffer shockwaves were enabled and a 3D shockwave was created, FSO would use a hardcoded reference to the second slot of the Shockwave_info vector to generate the framebuffer shockwave for it. This only makes sense if and only if:
- the 3D shockwave command-line flag is also enabled
- the default 3D shockwave and default 2D shockwave are both present and loaded
- its the first mission of the session (because after that any shockwave not in the 0th index got unloaded)
I've changed the code so that which index the default 2D shockwave got loaded into gets tracked and used instead of a hardcoded index... and if both default shockwaves are loaded, the first two Shockwave_info indices are both kept between missions instead of just the first. This should allow framebuffer shockwaves to work with 3D shockwaves, regardless of whether or not it's the first mission of the session and whether or not a custom 2D shockwave was loaded (and happened to wind up at index 1). Slight downside in that missing the default 2D shockwave file, but having a custom 2D shockwave loaded, will now result in framebuffer shockwaves not being drawn at all, rather than using the custom 2D shockwave by accident; not sure that's really all that much of a problem, though.1 parent 9447d74 commit c30ce55
1 file changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
395 | 396 | | |
396 | 397 | | |
397 | 398 | | |
398 | | - | |
| 399 | + | |
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
402 | | - | |
| 403 | + | |
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
| |||
493 | 494 | | |
494 | 495 | | |
495 | 496 | | |
| 497 | + | |
496 | 498 | | |
497 | 499 | | |
498 | 500 | | |
| |||
506 | 508 | | |
507 | 509 | | |
508 | 510 | | |
| 511 | + | |
| 512 | + | |
509 | 513 | | |
510 | 514 | | |
511 | 515 | | |
| |||
520 | 524 | | |
521 | 525 | | |
522 | 526 | | |
| 527 | + | |
523 | 528 | | |
524 | 529 | | |
525 | 530 | | |
| |||
566 | 571 | | |
567 | 572 | | |
568 | 573 | | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
569 | 580 | | |
570 | 581 | | |
571 | 582 | | |
| |||
576 | 587 | | |
577 | 588 | | |
578 | 589 | | |
579 | | - | |
| 590 | + | |
580 | 591 | | |
581 | 592 | | |
582 | 593 | | |
| |||
0 commit comments