Skip to content

Commit 81676b7

Browse files
author
Goober5000
committed
a few tweaks from the PR...
a) remove redundant (shadowing) polymodel *pm declaration b) end Warnings with \n c) remove no-longer-needed Asserts (they are handled by the Error check above)
1 parent e1e188a commit 81676b7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

code/model/modelinterp.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3610,13 +3610,12 @@ void submodel_get_two_random_points(int model_num, int submodel_num, vec3d *v1,
36103610
if (!submodel_get_two_random_points_warned)
36113611
{
36123612
polymodel *pm = model_get(model_num);
3613-
Warning(LOCATION, "RAND_MAX is only %d, but submodel %d for model %s has %d vertices! Explosions will not propagate through the entire model!", RAND_MAX, submodel_num, pm->filename, nv);
3613+
Warning(LOCATION, "RAND_MAX is only %d, but submodel %d for model %s has %d vertices! Explosions will not propagate through the entire model!\n", RAND_MAX, submodel_num, pm->filename, nv);
36143614
submodel_get_two_random_points_warned = true;
36153615
}
36163616
}
36173617
#endif
36183618

3619-
Assert(nv > 0); // Goober5000 - to avoid div-0 error
36203619
int vn1 = myrand() % nv;
36213620
int vn2 = myrand() % nv;
36223621

@@ -3661,14 +3660,12 @@ void submodel_get_two_random_points_better(int model_num, int submodel_num, vec3
36613660
static int submodel_get_two_random_points_warned = false;
36623661
if (!submodel_get_two_random_points_warned)
36633662
{
3664-
polymodel *pm = model_get(model_num);
3665-
Warning(LOCATION, "RAND_MAX is only %d, but submodel %d for model %s has %d vertices! Explosions will not propagate through the entire model!", RAND_MAX, submodel_num, pm->filename, nv);
3663+
Warning(LOCATION, "RAND_MAX is only %d, but submodel %d for model %s has %d vertices! Explosions will not propagate through the entire model!\n", RAND_MAX, submodel_num, pm->filename, nv);
36663664
submodel_get_two_random_points_warned = true;
36673665
}
36683666
}
36693667
#endif
36703668

3671-
Assert(nv > 0); // Goober5000 - to avoid div-0 error
36723669
int vn1 = myrand() % nv;
36733670
int vn2 = myrand() % nv;
36743671

0 commit comments

Comments
 (0)