Expand macro Current_mission_longname

This commit is contained in:
Kp 2021-11-01 03:37:19 +00:00
parent e69b7bd730
commit eb7cedc35d
3 changed files with 3 additions and 5 deletions

View file

@ -185,8 +185,6 @@ struct Mission : Mission_path
typedef std::unique_ptr<Mission> Mission_ptr;
extern Mission_ptr Current_mission; // current mission
#define Current_mission_longname Current_mission->mission_name
#if defined(DXX_BUILD_DESCENT_II)
/* Wrap in parentheses to avoid precedence problems. Put constant on
* the left to silence clang's overzealous -Wparentheses-equality messages.

View file

@ -1424,7 +1424,7 @@ int load_level(
* HACK to make this issue less visible by moving one vertex a little.
*/
auto &vmvertptr = Vertices.vmptr;
if (Current_mission && !d_stricmp("Descent: First Strike",Current_mission_longname) && !d_stricmp("level19.rdl",filename) && PHYSFS_fileLength(LoadFile) == 136706)
if (Current_mission && !d_stricmp("Descent: First Strike", Current_mission->mission_name) && !d_stricmp("level19.rdl", filename) && PHYSFS_fileLength(LoadFile) == 136706)
vmvertptr(vertnum_t{1905u})->z = -385 * F1_0;
#if defined(DXX_BUILD_DESCENT_II)
/* !!!HACK!!!
@ -1432,7 +1432,7 @@ int load_level(
* HACK to fix this by moving the Vertex and fixing the associated Normals.
* NOTE: This only fixes the normals of segment 104, not the other ones connected to this Vertex but this is unsignificant.
*/
if (Current_mission && !d_stricmp("Descent 2: Counterstrike!",Current_mission_longname) && !d_stricmp("d2levc-4.rl2",filename))
if (Current_mission && !d_stricmp("Descent 2: Counterstrike!", Current_mission->mission_name) && !d_stricmp("d2levc-4.rl2", filename))
{
shared_segment &s104 = *vmsegptr(vmsegidx_t(104));
auto &s104v0 = *vmvertptr(s104.verts[0]);

View file

@ -4212,7 +4212,7 @@ window_event_result net_udp_setup_game()
#endif
Netgame.mission_name.copy_if(&*Current_mission->filename, Netgame.mission_name.size());
Netgame.mission_title = Current_mission_longname;
Netgame.mission_title = Current_mission->mission_name;
Netgame.levelnum = 1;