Skip to content

Commit

Permalink
Merge pull request #6505 from Goober5000/hull_pof_graceful_fail
Browse files Browse the repository at this point in the history
gracefully fail if volumetrics model is not found
  • Loading branch information
Goober5000 authored Jan 6, 2025
2 parents b49db4e + 1527824 commit 49de71d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/nebula/volumetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,11 @@ void volumetric_nebula::renderVolumeBitmap() {
int nSample = (n << (oversampling - 1)) + 1;
auto volumeSampleCache = make_unique<bool[]>(nSample * nSample * nSample);

int modelnum = model_load(hullPof.c_str(), 0, nullptr);
int modelnum = model_load(hullPof.c_str(), 0, nullptr, -1);
if (modelnum < 0) {
Warning(LOCATION, "Could not load model '%s'. Unable to render volume bitmap!", hullPof.c_str());
return;
}

const polymodel* pm = model_get(modelnum);
//Scale up by 2% to ensure that the 3d volume texture does not end on an axis aligned edge with full opacity.
Expand Down

0 comments on commit 49de71d

Please sign in to comment.