You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mprintf(("SHOCKWAVE => Default animation load: FAILED!! Checking if 3d effect was already tried...\n"));
511
+
Assertion(i <= 1, "Default 2D shockwave should be either the first or second shockwave loaded, but instead got loaded into index %d; get a coder!\n", i);
512
+
Default_2D_shockwave_index = i;
509
513
}
510
514
511
515
// chief1983 - The first patch broke mods that don't provide a 2d shockwave or define a specific shockwave for each model/weapon (shame on them)
@@ -520,6 +524,7 @@ void shockwave_level_init()
520
524
mprintf(("SHOCKWAVE => Default model load: SUCCEEDED!!\n"));
521
525
else
522
526
mprintf(("SHOCKWAVE => Default model load: FAILED!! No effect loaded...\n"));
527
+
Assertion(i <= 0, "Default 3D shockwave should be the first shockwave loaded, but instead got loaded into index %d; get a coder!\n", i);
523
528
}
524
529
525
530
if (i < 0)
@@ -566,6 +571,12 @@ void shockwave_level_close()
566
571
bm_unload( it->bitmap_id );
567
572
elseif (it->model_id >= 0)
568
573
model_page_out_textures( it->model_id );
574
+
if (Default_2D_shockwave_index == 1) {
575
+
// 3D shockwaves and framebuffer shockwaves are both enabled and the default 2D shockwave is in the next slot of the vector
576
+
++it;
577
+
Assertion(it->bitmap_id >= 0, "Default 2D shockwave was loaded but is somehow missing its bitmap; get a coder!\n");
578
+
bm_unload(it->bitmap_id);
579
+
}
569
580
570
581
for (++it; it != Shockwave_info.end(); ++it) {
571
582
if (it->bitmap_id >= 0)
@@ -576,7 +587,7 @@ void shockwave_level_close()
576
587
}
577
588
578
589
// if there's no extra shockwaves, this is still fine (erasing from end() to end() is both valid and a no-op)
0 commit comments