mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 22:51:39 +00:00
- allow setting the FloatbobPhase through UDMF.
This commit is contained in:
parent
888f356e58
commit
9bfd676783
7 changed files with 13 additions and 0 deletions
|
@ -237,6 +237,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
scalex = <float>; // Vertical scaling on thing. Default = 0 (ignored).
|
scalex = <float>; // Vertical scaling on thing. Default = 0 (ignored).
|
||||||
scaley = <float>; // Horizontal scaling on thing. Default = 0 (ignored).
|
scaley = <float>; // Horizontal scaling on thing. Default = 0 (ignored).
|
||||||
scale = <float>; // Vertical and horizontal scaling on thing. Default = 0 (ignored).
|
scale = <float>; // Vertical and horizontal scaling on thing. Default = 0 (ignored).
|
||||||
|
floatbobphase = <int>; // Sets the thing's floatbobphase. Valid phase values are 0-63. Default = -1 (use actor class default).
|
||||||
|
|
||||||
* Note about arg0str
|
* Note about arg0str
|
||||||
|
|
||||||
|
|
|
@ -365,6 +365,7 @@ struct FMapThing
|
||||||
short pitch;
|
short pitch;
|
||||||
short roll;
|
short roll;
|
||||||
DWORD RenderStyle;
|
DWORD RenderStyle;
|
||||||
|
int FloatbobPhase;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -396,6 +396,7 @@ xx(Roll)
|
||||||
xx(Scale)
|
xx(Scale)
|
||||||
xx(ScaleX)
|
xx(ScaleX)
|
||||||
xx(ScaleY)
|
xx(ScaleY)
|
||||||
|
xx(Floatbobphase)
|
||||||
|
|
||||||
xx(Blocking)
|
xx(Blocking)
|
||||||
xx(Blockmonsters)
|
xx(Blockmonsters)
|
||||||
|
|
|
@ -707,6 +707,7 @@ static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites,
|
||||||
mapthings[count].RenderStyle = STYLE_Count;
|
mapthings[count].RenderStyle = STYLE_Count;
|
||||||
mapthings[count].alpha = -1;
|
mapthings[count].alpha = -1;
|
||||||
mapthings[count].health = -1;
|
mapthings[count].health = -1;
|
||||||
|
mapthings[count].FloatbobPhase = -1;
|
||||||
|
|
||||||
if (xsprites != NULL && sprites[i].lotag == 710)
|
if (xsprites != NULL && sprites[i].lotag == 710)
|
||||||
{ // Blood ambient sound
|
{ // Blood ambient sound
|
||||||
|
|
|
@ -4917,6 +4917,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
mobj->SpawnPoint[2] = mthing->z;
|
mobj->SpawnPoint[2] = mthing->z;
|
||||||
mobj->SpawnAngle = mthing->angle;
|
mobj->SpawnAngle = mthing->angle;
|
||||||
mobj->SpawnFlags = mthing->flags;
|
mobj->SpawnFlags = mthing->flags;
|
||||||
|
if (mthing->FloatbobPhase >= 0 && mthing->FloatbobPhase < 64) mobj->FloatBobPhase = mthing->FloatbobPhase;
|
||||||
if (mthing->gravity < 0) mobj->gravity = -mthing->gravity;
|
if (mthing->gravity < 0) mobj->gravity = -mthing->gravity;
|
||||||
else if (mthing->gravity > 0) mobj->gravity = FixedMul(mobj->gravity, mthing->gravity);
|
else if (mthing->gravity > 0) mobj->gravity = FixedMul(mobj->gravity, mthing->gravity);
|
||||||
else mobj->flags &= ~MF_NOGRAVITY;
|
else mobj->flags &= ~MF_NOGRAVITY;
|
||||||
|
|
|
@ -1758,6 +1758,7 @@ void P_LoadThings (MapData * map)
|
||||||
mti[i].RenderStyle = STYLE_Count;
|
mti[i].RenderStyle = STYLE_Count;
|
||||||
mti[i].alpha = -1;
|
mti[i].alpha = -1;
|
||||||
mti[i].health = 1;
|
mti[i].health = 1;
|
||||||
|
mti[i].FloatbobPhase = -1;
|
||||||
flags &= ~MTF_SKILLMASK;
|
flags &= ~MTF_SKILLMASK;
|
||||||
mti[i].flags = (short)((flags & 0xf) | 0x7e0);
|
mti[i].flags = (short)((flags & 0xf) | 0x7e0);
|
||||||
if (gameinfo.gametype == GAME_Strife)
|
if (gameinfo.gametype == GAME_Strife)
|
||||||
|
@ -1842,6 +1843,7 @@ void P_LoadThings2 (MapData * map)
|
||||||
mti[i].RenderStyle = STYLE_Count;
|
mti[i].RenderStyle = STYLE_Count;
|
||||||
mti[i].alpha = -1;
|
mti[i].alpha = -1;
|
||||||
mti[i].health = 1;
|
mti[i].health = 1;
|
||||||
|
mti[i].FloatbobPhase = -1;
|
||||||
}
|
}
|
||||||
delete[] mtp;
|
delete[] mtp;
|
||||||
}
|
}
|
||||||
|
|
|
@ -474,6 +474,7 @@ public:
|
||||||
th->RenderStyle = STYLE_Count;
|
th->RenderStyle = STYLE_Count;
|
||||||
th->alpha = -1;
|
th->alpha = -1;
|
||||||
th->health = 1;
|
th->health = 1;
|
||||||
|
th->FloatbobPhase = -1;
|
||||||
sc.MustGetToken('{');
|
sc.MustGetToken('{');
|
||||||
while (!sc.CheckToken('}'))
|
while (!sc.CheckToken('}'))
|
||||||
{
|
{
|
||||||
|
@ -631,6 +632,11 @@ public:
|
||||||
Flag(th->flags, MTF_SECRET, key);
|
Flag(th->flags, MTF_SECRET, key);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NAME_Floatbobphase:
|
||||||
|
CHECK_N(Zd | Zdt)
|
||||||
|
th->FloatbobPhase = CheckInt(key);
|
||||||
|
break;
|
||||||
|
|
||||||
case NAME_Renderstyle:
|
case NAME_Renderstyle:
|
||||||
{
|
{
|
||||||
FName style = CheckString(key);
|
FName style = CheckString(key);
|
||||||
|
|
Loading…
Reference in a new issue