Skip to content
Merged
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
2 changes: 2 additions & 0 deletions code/lab/renderer/lab_renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@ void LabRenderer::useBackground(const SCP_string& mission_name) {
ltp_name = ltp::default_name();
if(optional_string("$Lighting Profile:")){
stuff_string(ltp_name,F_NAME);
if (ltp_name.empty())
ltp_name = ltp::default_name();
}
if (ltp_name != ltp::current()->name) {
ltp::switch_to(ltp_name);
Expand Down
9 changes: 7 additions & 2 deletions code/mission/missionmessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2647,8 +2647,13 @@ bool add_message(const char* name, const char* message, int persona_index, int m
strcpy_s(msg.message, message);
msg.persona_index = persona_index;
msg.multi_team = multi_team;
msg.avi_info.index = -1;
msg.wave_info.index = -1;
if (Fred_running) {
msg.avi_info.name = nullptr;
msg.wave_info.name = nullptr;
} else {
msg.avi_info.index = -1;
msg.wave_info.index = -1;
}
Messages.push_back(msg);
Num_messages++;

Expand Down
2 changes: 2 additions & 0 deletions code/mission/missionparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,8 @@ void parse_mission_info(mission *pm, bool basic = false)
if (optional_string("$Lighting Profile:"))
{
stuff_string(The_mission.lighting_profile_name, F_NAME);
if (The_mission.lighting_profile_name.empty())
The_mission.lighting_profile_name = lighting_profiles::default_name();
}
else
The_mission.lighting_profile_name = lighting_profiles::default_name();
Expand Down
2 changes: 0 additions & 2 deletions code/mission/missionparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ typedef struct mission {
int skybox_flags;
int contrail_threshold;
int ambient_light_level;
float neb_far_multi;
float neb_near_multi;
std::optional<volumetric_nebula> volumetrics;
sound_env sound_environment;
vec3d gravity;
Expand Down
2 changes: 1 addition & 1 deletion code/missioneditor/missionsave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2977,7 +2977,7 @@ int Fred_mission_save::save_mission_info()
fso_comment_pop();

// EatThePath's lighting profiles
if (The_mission.lighting_profile_name != lighting_profiles::default_name()) {
if (!The_mission.lighting_profile_name.empty() && The_mission.lighting_profile_name != lighting_profiles::default_name()) {
fso_comment_push(";;FSO 23.1.0;;");
if (optional_string_fred("$Lighting Profile:")) {
parse_comments(2);
Expand Down
Loading