Multiply the default radius of 384 by mobjscale, but not user set radiuses

This commit is contained in:
James R 2020-05-04 17:54:43 -07:00
parent e2d4ddcec2
commit 7c9824dc56
4 changed files with 12 additions and 4 deletions

View file

@ -290,7 +290,7 @@ typedef struct
// SRB2kart
//boolean automap; ///< Displays a level's white map outline in modified games
fixed_t mobj_scale; ///< Replacement for TOL_ERZ3
fixed_t default_waypoint_radius;
fixed_t default_waypoint_radius; ///< 0 is a special value for DEFAULT_WAYPOINT_RADIUS, but scaled with mobjscale
// Music stuff.
UINT32 musinterfadeout; ///< Fade out level music on intermission screen in milliseconds

View file

@ -18,7 +18,7 @@
#include "p_mobj.h"
#include "k_pathfind.h"
#define DEFAULT_WAYPOINT_RADIUS (384*FRACUNIT)
#define DEFAULT_WAYPOINT_RADIUS (384)
typedef struct waypoint_s
{

View file

@ -12665,9 +12665,17 @@ ML_NOCLIMB : Direction not controllable
break;
case MT_WAYPOINT:
{
const fixed_t mobjscale =
mapheaderinfo[gamemap-1]->default_waypoint_radius;
// Just like MT_SPINMACEPOINT, this now works here too!
INT32 line = P_FindSpecialLineFromTag(2000, mthing->angle, -1);
mobj->radius = mapheaderinfo[gamemap-1]->default_waypoint_radius;
if (mobjscale == 0)
mobj->radius = DEFAULT_WAYPOINT_RADIUS * mapobjectscale;
else
mobj->radius = mobjscale;
// Set the radius, mobj z, and mthing z to match what the parameters want
if (line != -1)
{

View file

@ -259,7 +259,7 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
DEH_WriteUndoline("MOBJSCALE", va("%d", mapheaderinfo[num]->mobj_scale), UNDO_NONE);
mapheaderinfo[num]->mobj_scale = FRACUNIT;
DEH_WriteUndoline("DEFAULTWAYPOINTRADIUS", va("%d", mapheaderinfo[num]->default_waypoint_radius), UNDO_NONE);
mapheaderinfo[num]->default_waypoint_radius = DEFAULT_WAYPOINT_RADIUS;
mapheaderinfo[num]->default_waypoint_radius = 0;
// an even further impossibility, delfile custom opts support
mapheaderinfo[num]->customopts = NULL;
mapheaderinfo[num]->numCustomOptions = 0;