diff --git a/src/k_waypoint.c b/src/k_waypoint.c index 2c9ebec9a..28ff00d04 100644 --- a/src/k_waypoint.c +++ b/src/k_waypoint.c @@ -2238,6 +2238,7 @@ static boolean K_RaiseWaypoint( fixed_t sort; fixed_t z; + fixed_t delta; if ( !( riser->spawnpoint->options & MTF_OBJECTSPECIAL ) || @@ -2282,6 +2283,13 @@ static boolean K_RaiseWaypoint( } } + // Keep changes for -writetextmap + if (descending) + delta = sort - waypointmobj->z; + else + delta = waypointmobj->z - sort; + waypointmobj->spawnpoint->z += delta; + waypointmobj->z = sort; } @@ -2316,6 +2324,8 @@ static boolean K_AnchorWaypointRadius( waypointmobj->x, waypointmobj->y, anchor->x, anchor->y); + // Keep changes for -writetextmap + waypointmobj->spawnpoint->args[0] = waypointmobj->radius >> FRACBITS; return true; } else diff --git a/src/p_setup.c b/src/p_setup.c index d86f9bcea..b268078fc 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -6593,8 +6593,11 @@ static void P_ConvertBinaryMap(void) P_ConvertBinarySectorTypes(); P_ConvertBinaryThingTypes(); P_ConvertBinaryLinedefFlags(); + +#if 0 // Don't do this yet... if (M_CheckParm("-writetextmap")) P_WriteTextmap(); +#endif } /** Compute MD5 message digest for bytes read from memory source @@ -7433,6 +7436,10 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate) { // Backwards compatibility for non-UDMF maps K_AdjustWaypointsParameters(); + + // Moved over here... + if (M_CheckParm("-writetextmap")) + P_WriteTextmap(); } if (!fromnetsave) // ugly hack for P_NetUnArchiveMisc (and P_LoadNetGame)