When reading mission file, check for sanity of possible breifing or ending to make sure author did not just screw up the file; Fixed slight bug when playing ending briefings from secret levels

This commit is contained in:
zicodxx 2010-07-08 22:12:53 +00:00
parent a792b3a197
commit 52b57dbd31
2 changed files with 10 additions and 4 deletions

View file

@ -1,5 +1,9 @@
D1X-Rebirth Changelog
20100709
--------
main/mission.c: When reading mission file, check for sanity of possible breifing or ending to make sure author did not just screw up the file
20100708
--------
main/net_udp.c, main/net_udp.h: Reworked handling of Netlist now also showing full game info; Prevent Clients from sending lite_info; Make lite_info show numconnected instead of numplayers as this would show disconnected ones as well; Removed reusing ports on different instances in Windows build - only screws up several games running on one machine

View file

@ -537,15 +537,17 @@ int load_mission(mle *mission)
else if (istok(buf,"briefing")) {
if ((v = get_value(buf)) != NULL) {
add_term(v);
if (strlen(v) < 13)
strcpy(Briefing_text_filename,v);
if (strlen(v) < 13 && strlen(v) > 0)
if (!stricmp(strrchr(v, '.'), ".tex") || !stricmp(strrchr(v, '.'), ".txb"))
strcpy(Briefing_text_filename,v);
}
}
else if (istok(buf,"ending")) {
if ((v = get_value(buf)) != NULL) {
add_term(v);
if (strlen(v) < 13)
strcpy(Ending_text_filename,v);
if (strlen(v) < 13 && strlen(v) > 0)
if (!stricmp(strrchr(v, '.'), ".tex") || !stricmp(strrchr(v, '.'), ".txb"))
strcpy(Ending_text_filename,v);
}
}
else if (istok(buf,"num_levels")) {