mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 21:50:48 +00:00
Fix ERZ3 mode
This commit is contained in:
parent
6f9c48a305
commit
3472b3ece3
1 changed files with 8 additions and 8 deletions
16
src/p_mobj.c
16
src/p_mobj.c
|
@ -10438,19 +10438,12 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||||
mobj->x = x;
|
mobj->x = x;
|
||||||
mobj->y = y;
|
mobj->y = y;
|
||||||
|
|
||||||
// TODO: Make this a special map header
|
|
||||||
if ((maptol & TOL_ERZ3) && !(mobj->type == MT_BLACKEGGMAN))
|
|
||||||
mobj->destscale = FRACUNIT/2;
|
|
||||||
|
|
||||||
P_SetMobjSpawnDefaults(mobj);
|
P_SetMobjSpawnDefaults(mobj);
|
||||||
|
|
||||||
// set subsector and/or block links
|
// set subsector and/or block links
|
||||||
P_SetThingPosition(mobj);
|
P_SetThingPosition(mobj);
|
||||||
I_Assert(mobj->subsector != NULL);
|
I_Assert(mobj->subsector != NULL);
|
||||||
|
|
||||||
// Make sure scale matches destscale immediately when spawned
|
|
||||||
P_SetScale(mobj, mobj->destscale);
|
|
||||||
|
|
||||||
mobj->floorz = P_GetSectorFloorZAt (mobj->subsector->sector, x, y);
|
mobj->floorz = P_GetSectorFloorZAt (mobj->subsector->sector, x, y);
|
||||||
mobj->ceilingz = P_GetSectorCeilingZAt(mobj->subsector->sector, x, y);
|
mobj->ceilingz = P_GetSectorCeilingZAt(mobj->subsector->sector, x, y);
|
||||||
|
|
||||||
|
@ -10816,9 +10809,16 @@ void P_SetMobjSpawnDefaults(mobj_t *mobj)
|
||||||
mobj->destscale = mobj->scale;
|
mobj->destscale = mobj->scale;
|
||||||
mobj->scalespeed = FRACUNIT/12;
|
mobj->scalespeed = FRACUNIT/12;
|
||||||
|
|
||||||
|
// TODO: Make this a special map header
|
||||||
|
if ((maptol & TOL_ERZ3) && !(mobj->type == MT_BLACKEGGMAN))
|
||||||
|
mobj->destscale = FRACUNIT/2;
|
||||||
|
|
||||||
|
// Make sure scale matches destscale immediately when spawned
|
||||||
|
P_SetScale(mobj, mobj->destscale);
|
||||||
|
|
||||||
// Sprite rendering
|
// Sprite rendering
|
||||||
mobj->blendmode = AST_TRANSLUCENT;
|
mobj->blendmode = AST_TRANSLUCENT;
|
||||||
mobj->spritexscale = mobj->spriteyscale = mobj->scale;
|
mobj->spritexscale = mobj->spriteyscale = FRACUNIT;
|
||||||
mobj->spritexoffset = mobj->spriteyoffset = 0;
|
mobj->spritexoffset = mobj->spriteyoffset = 0;
|
||||||
mobj->floorspriteslope = NULL;
|
mobj->floorspriteslope = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue