mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
more FRED fixes when dialogs pop up
FRED can get into a weird state if a warning appears while a ship is being created, e.g. if the ship has a null moment of inertia. So, prevent FRED from rendering a ship if it hasn't been fully initialized yet.
This commit is contained in:
1 parent
14a900e554
commit
d8a6d68482
5 files changed
+13
-4
No files matched your search
@@ -1820,6 +1820,10 @@ void render_one_model_htl(object *objp) {
|
||||
|
||||
Assert(objp->type != OBJ_NONE);
|
||||
|
||||
// if this object isn't fully created yet, don't render it
|
||||
if (objp->type == OBJ_SHIP && Ships[objp->instance].create_time == 0)
|
||||
return;
|
||||
|
||||
if (objp->type == OBJ_JUMP_NODE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ void jumpnode_dlg::initialize_data(int full_update)
|
||||
GetDlgItem(IDC_NAME)->EnableWindow(enable);
|
||||
}
|
||||
|
||||
int jumpnode_dlg::update_data()
|
||||
int jumpnode_dlg::update_data(int redraw)
|
||||
{
|
||||
const char *str;
|
||||
char old_name[255];
|
||||
@@ -345,7 +345,8 @@ int jumpnode_dlg::update_data()
|
||||
|
||||
}
|
||||
|
||||
update_map_window();
|
||||
if (redraw)
|
||||
update_map_window();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ class jumpnode_dlg : public CDialog
|
||||
// Construction
|
||||
public:
|
||||
int bypass_errors;
|
||||
int update_data();
|
||||
int update_data(int redraw = 1);
|
||||
void initialize_data(int full_update);
|
||||
void OnOK();
|
||||
BOOL Create();
|
||||
|
||||
@@ -1180,7 +1180,7 @@ int update_dialog_boxes()
|
||||
return z;
|
||||
}
|
||||
|
||||
z = Jumpnode_editor_dialog.update_data();
|
||||
z = Jumpnode_editor_dialog.update_data(0);
|
||||
if (z) {
|
||||
nprintf(("Fred routing", "jumpnode dialog save failed\n"));
|
||||
Jumpnode_editor_dialog
|
||||
|
||||
@@ -794,6 +794,10 @@ void FredRenderer::render_one_model_htl(object* objp,
|
||||
|
||||
Assert(objp->type != OBJ_NONE);
|
||||
|
||||
// if this object isn't fully created yet, don't render it
|
||||
if (objp->type == OBJ_SHIP && Ships[objp->instance].create_time == 0)
|
||||
return;
|
||||
|
||||
if (objp->type == OBJ_JUMP_NODE) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user