More proper method of setting mapobjectscale in non-UDMF maps

(I did the same change for UDMF too but it may be wrong; I don't have a test map for it though so I guess we'll see later)
This commit is contained in:
Sally Coolatta 2020-09-27 03:18:21 -04:00
parent e1dcf80f8d
commit c3e7e51d89
2 changed files with 7 additions and 8 deletions

View file

@ -11531,13 +11531,12 @@ static mobj_t *P_SpawnMobjFromMapThing(mapthing_t *mthing, fixed_t x, fixed_t y,
{
mobj_t *mobj = NULL;
boolean doangle = true;
fixed_t full_scale = FixedMul(mthing->scale, mapobjectscale);
mobj = P_SpawnMobj(x, y, z, i);
mobj->spawnpoint = mthing;
P_SetScale(mobj, full_scale);
mobj->destscale = full_scale;
P_SetScale(mobj, mthing->scale);
mobj->destscale = mthing->scale;
if (!P_SetupSpawnedMapThing(mthing, mobj, &doangle))
return mobj;

View file

@ -1349,7 +1349,7 @@ static void P_LoadThings(UINT8 *data)
mt->type = READUINT16(data);
mt->options = READUINT16(data);
mt->extrainfo = (UINT8)(mt->type >> 12);
mt->scale = FRACUNIT;
mt->scale = mapobjectscale;
mt->tag = 0;
memset(mt->args, 0, NUMMAPTHINGARGS*sizeof(*mt->args));
memset(mt->stringargs, 0x00, NUMMAPTHINGSTRINGARGS*sizeof(*mt->stringargs));
@ -1875,7 +1875,7 @@ static void P_LoadTextmap(void)
mt->options = 0;
mt->z = 0;
mt->extrainfo = 0;
mt->scale = FRACUNIT;
mt->scale = mapobjectscale;
mt->tag = 0;
memset(mt->args, 0, NUMMAPTHINGARGS*sizeof(*mt->args));
memset(mt->stringargs, 0x00, NUMMAPTHINGSTRINGARGS*sizeof(*mt->stringargs));
@ -3976,12 +3976,12 @@ boolean P_LoadLevel(boolean fromnetsave)
P_MapStart();
if (!P_LoadMapFromFile())
return false;
// init anything that P_SpawnSlopes/P_LoadThings needs to know
P_InitSpecials();
if (!P_LoadMapFromFile())
return false;
// set up world state
// jart: needs to be done here so anchored slopes know the attached list
P_SpawnSpecials(fromnetsave);