mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-23 04:11:17 +00:00
Add mapthing scale support.
This commit is contained in:
parent
a7ef15e6f6
commit
c96778c4a5
3 changed files with 12 additions and 9 deletions
|
@ -180,6 +180,7 @@ typedef struct
|
|||
UINT16 options;
|
||||
INT16 z;
|
||||
UINT8 extrainfo;
|
||||
INT32 scale;
|
||||
struct mobj_s *mobj;
|
||||
} mapthing_t;
|
||||
|
||||
|
|
|
@ -11623,13 +11623,13 @@ static fixed_t GetMobjSpawnHeight (const mobjtype_t i, const mapthing_t* mthing,
|
|||
#ifdef ESLOPE
|
||||
ss->sector->c_slope ? P_GetZAt(ss->sector->c_slope, x, y) :
|
||||
#endif
|
||||
ss->sector->ceilingheight) - extraoffset - heightoffset - mobjinfo[i].height;
|
||||
ss->sector->ceilingheight) - FixedMul(extraoffset, mthing->scale) - heightoffset - mobjinfo[i].height;
|
||||
else
|
||||
return (
|
||||
#ifdef ESLOPE
|
||||
ss->sector->f_slope ? P_GetZAt(ss->sector->f_slope, x, y) :
|
||||
#endif
|
||||
ss->sector->floorheight) + extraoffset + heightoffset;
|
||||
ss->sector->floorheight) + FixedMul(extraoffset, mthing->scale) + heightoffset;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -11897,6 +11897,8 @@ You should think about modifying the deathmatch starts to take full advantage of
|
|||
z = GetMobjSpawnHeight(i, mthing, x, y);
|
||||
|
||||
mobj = P_SpawnMobj(x, y, z, i);
|
||||
P_SetScale(mobj, mthing->scale);
|
||||
mobj->destscale = mthing->scale;
|
||||
mobj->spawnpoint = mthing;
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
|
|
|
@ -721,7 +721,7 @@ static void GeneralDefaults(void)
|
|||
line_t *ld;
|
||||
// side_t *sd;
|
||||
sector_t *sc;
|
||||
// mapthing_t *mt;
|
||||
mapthing_t *mt;
|
||||
// vertex_t* vt;
|
||||
|
||||
for (i = 0, ld = lines; i < numlines; i++, ld++)
|
||||
|
@ -828,15 +828,15 @@ static void GeneralDefaults(void)
|
|||
// sc->lightfloor = sc->lightceiling = 0;
|
||||
// sc->lightfloorabsolute = sc->lightceilingabsolute = false;
|
||||
}
|
||||
/*
|
||||
|
||||
for (i = 0, mt = mapthings; i < nummapthings; i++, mt++)
|
||||
{
|
||||
// Initialization.
|
||||
|
||||
// Defaults.
|
||||
mt->pitch = mt->roll = 0;
|
||||
/* mt->pitch = mt->roll = 0; */
|
||||
mt->scale = FRACUNIT;
|
||||
for (j = 0; j < NUMTHINGPARAMS; j++)
|
||||
/* for (j = 0; j < NUMTHINGPARAMS; j++)
|
||||
mt->params[j] = 0;
|
||||
mt->spawntrigger = 0;
|
||||
mt->seetrigger = 0;
|
||||
|
@ -845,9 +845,9 @@ static void GeneralDefaults(void)
|
|||
mt->missiletrigger = 0;
|
||||
mt->deathtrigger = 0;
|
||||
mt->xdeathtrigger = 0;
|
||||
mt->raisetrigger = 0;
|
||||
mt->raisetrigger = 0;*/
|
||||
}
|
||||
|
||||
/*
|
||||
for (i = 0, vt = vertexes; i < numvertexes; i++, vt++)
|
||||
{
|
||||
// Initialization.
|
||||
|
@ -1244,9 +1244,9 @@ static void TextmapThing(UINT32 i, char *param)
|
|||
#endif
|
||||
else if (fastcmp(param, "type"))
|
||||
mapthings[i].type = atol(M_GetToken(NULL));
|
||||
#ifdef ADVUDMF
|
||||
else if (fastcmp(param, "scale") || fastcmp(param, "scalex"))
|
||||
mapthings[i].scale = FLOAT_TO_FIXED(atof(M_GetToken(NULL)));
|
||||
#ifdef ADVUDMF
|
||||
else if (fastcmp(param, "spawntrigger"))
|
||||
mapthings[i].spawntrigger = atol(M_GetToken(NULL));
|
||||
else if (fastcmp(param, "seetrigger"))
|
||||
|
|
Loading…
Reference in a new issue