mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
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:
parent
e1dcf80f8d
commit
c3e7e51d89
2 changed files with 7 additions and 8 deletions
|
|
@ -11531,13 +11531,12 @@ static mobj_t *P_SpawnMobjFromMapThing(mapthing_t *mthing, fixed_t x, fixed_t y,
|
||||||
{
|
{
|
||||||
mobj_t *mobj = NULL;
|
mobj_t *mobj = NULL;
|
||||||
boolean doangle = true;
|
boolean doangle = true;
|
||||||
fixed_t full_scale = FixedMul(mthing->scale, mapobjectscale);
|
|
||||||
|
|
||||||
mobj = P_SpawnMobj(x, y, z, i);
|
mobj = P_SpawnMobj(x, y, z, i);
|
||||||
mobj->spawnpoint = mthing;
|
mobj->spawnpoint = mthing;
|
||||||
|
|
||||||
P_SetScale(mobj, full_scale);
|
P_SetScale(mobj, mthing->scale);
|
||||||
mobj->destscale = full_scale;
|
mobj->destscale = mthing->scale;
|
||||||
|
|
||||||
if (!P_SetupSpawnedMapThing(mthing, mobj, &doangle))
|
if (!P_SetupSpawnedMapThing(mthing, mobj, &doangle))
|
||||||
return mobj;
|
return mobj;
|
||||||
|
|
|
||||||
|
|
@ -1349,7 +1349,7 @@ static void P_LoadThings(UINT8 *data)
|
||||||
mt->type = READUINT16(data);
|
mt->type = READUINT16(data);
|
||||||
mt->options = READUINT16(data);
|
mt->options = READUINT16(data);
|
||||||
mt->extrainfo = (UINT8)(mt->type >> 12);
|
mt->extrainfo = (UINT8)(mt->type >> 12);
|
||||||
mt->scale = FRACUNIT;
|
mt->scale = mapobjectscale;
|
||||||
mt->tag = 0;
|
mt->tag = 0;
|
||||||
memset(mt->args, 0, NUMMAPTHINGARGS*sizeof(*mt->args));
|
memset(mt->args, 0, NUMMAPTHINGARGS*sizeof(*mt->args));
|
||||||
memset(mt->stringargs, 0x00, NUMMAPTHINGSTRINGARGS*sizeof(*mt->stringargs));
|
memset(mt->stringargs, 0x00, NUMMAPTHINGSTRINGARGS*sizeof(*mt->stringargs));
|
||||||
|
|
@ -1875,7 +1875,7 @@ static void P_LoadTextmap(void)
|
||||||
mt->options = 0;
|
mt->options = 0;
|
||||||
mt->z = 0;
|
mt->z = 0;
|
||||||
mt->extrainfo = 0;
|
mt->extrainfo = 0;
|
||||||
mt->scale = FRACUNIT;
|
mt->scale = mapobjectscale;
|
||||||
mt->tag = 0;
|
mt->tag = 0;
|
||||||
memset(mt->args, 0, NUMMAPTHINGARGS*sizeof(*mt->args));
|
memset(mt->args, 0, NUMMAPTHINGARGS*sizeof(*mt->args));
|
||||||
memset(mt->stringargs, 0x00, NUMMAPTHINGSTRINGARGS*sizeof(*mt->stringargs));
|
memset(mt->stringargs, 0x00, NUMMAPTHINGSTRINGARGS*sizeof(*mt->stringargs));
|
||||||
|
|
@ -3976,12 +3976,12 @@ boolean P_LoadLevel(boolean fromnetsave)
|
||||||
|
|
||||||
P_MapStart();
|
P_MapStart();
|
||||||
|
|
||||||
if (!P_LoadMapFromFile())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// init anything that P_SpawnSlopes/P_LoadThings needs to know
|
// init anything that P_SpawnSlopes/P_LoadThings needs to know
|
||||||
P_InitSpecials();
|
P_InitSpecials();
|
||||||
|
|
||||||
|
if (!P_LoadMapFromFile())
|
||||||
|
return false;
|
||||||
|
|
||||||
// set up world state
|
// set up world state
|
||||||
// jart: needs to be done here so anchored slopes know the attached list
|
// jart: needs to be done here so anchored slopes know the attached list
|
||||||
P_SpawnSpecials(fromnetsave);
|
P_SpawnSpecials(fromnetsave);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue