Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions fred2/fredrender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1820,6 +1820,12 @@ 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_PROP && (!Props[objp->instance].has_value() || Props[objp->instance].value().create_time == 0))
return;

if (objp->type == OBJ_JUMP_NODE) {
return;
}
Expand Down
5 changes: 3 additions & 2 deletions fred2/jumpnodedlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -345,7 +345,8 @@ int jumpnode_dlg::update_data()

}

update_map_window();
if (redraw)
update_map_window();

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion fred2/jumpnodedlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions fred2/management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ int update_dialog_boxes()
return z;
}

z = Prop_editor_dialog.update_data();
z = Prop_editor_dialog.update_data(0);
if (z) {
nprintf(("Fred routing", "prop dialog save failed\n"));
Prop_editor_dialog.SetWindowPos(&Fred_main_wnd->wndTop, 0, 0, 0, 0,
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions fred2/propdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void prop_dlg::initialize_data(int full_update)
m_flags_list.EnableWindow(enable);
}

int prop_dlg::update_data()
int prop_dlg::update_data(int redraw)
{
if (!GetSafeHwnd())
return 0;
Expand Down Expand Up @@ -185,7 +185,9 @@ int prop_dlg::update_data()
}
}

update_map_window();
if (redraw)
update_map_window();

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion fred2/propdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class prop_dlg : public CDialog {
public:
int bypass_errors;
BOOL Create();
int update_data();
int update_data(int redraw = 1);
void initialize_data(int full_update);
void OnOK();
prop_dlg(CWnd* pParent = NULL); // standard constructor
Expand Down
7 changes: 7 additions & 0 deletions qtfred/src/mission/FredRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <mod_table/mod_table.h>

#include "mission/object.h"
#include "prop/prop.h"
#include "weapon/weapon.h"


Expand Down Expand Up @@ -794,6 +795,12 @@ 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_PROP && (!Props[objp->instance].has_value() || Props[objp->instance].value().create_time == 0))
return;

if (objp->type == OBJ_JUMP_NODE) {
return;
}
Expand Down