Don't crash when building segment bridge in editor the wrong way
Check if there is Markedsegp and replacing an Assert with a LevelError.
This commit is contained in:
parent
ac52a30214
commit
4568bbae11
|
@ -35,6 +35,11 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
// ---------- Create a bridge segment between current segment/side and marked segment/side ----------
|
||||
int CreateBridge()
|
||||
{
|
||||
if (!Markedsegp) {
|
||||
editor_status("No marked side.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!med_form_bridge_segment(Cursegp,Curside,Markedsegp,Markedside)) {
|
||||
Update_flags |= UF_WORLD_CHANGED;
|
||||
mine_changed = 1;
|
||||
|
|
|
@ -1277,7 +1277,8 @@ static void get_verts_for_normal(int va, int vb, int vc, int vd, int *v0, int *v
|
|||
swap(w[j], w[i]);
|
||||
}
|
||||
|
||||
Assert((v[0] < v[1]) && (v[1] < v[2]) && (v[2] < v[3]));
|
||||
if (!((v[0] < v[1]) && (v[1] < v[2]) && (v[2] < v[3])))
|
||||
LevelError("Level contains malformed geometry.");
|
||||
|
||||
// Now, if for any w[i] & w[i+1]: w[i+1] = (w[i]+3)%4, then must swap
|
||||
*v0 = v[0];
|
||||
|
|
Loading…
Reference in a new issue