mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
"Bored" follower audience toggle (for Chaclon)
- If follower audience member has a certain flag, the bob/jump height is forced to zero
- UDMF: args[2] & 2
- Binary: The "Extra" flag
- If a follower audience member (or MT_EMBLEM with GE_FOLLOWER) has a bob/jump height of 0, use the idlestate instead of the movement state
This commit is contained in:
parent
8b2b3aaee8
commit
164f72a6cb
4 changed files with 38 additions and 16 deletions
|
|
@ -101,25 +101,32 @@ Obj_AudienceInit
|
||||||
mobj->destscale = FixedMul(3*mobj->destscale, followers[followerpick].scale);
|
mobj->destscale = FixedMul(3*mobj->destscale, followers[followerpick].scale);
|
||||||
P_SetScale(mobj, mobj->destscale);
|
P_SetScale(mobj, mobj->destscale);
|
||||||
|
|
||||||
audience_mainstate(mobj) = followers[followerpick].followstate;
|
if (mobj->flags2 & MF2_BOSSNOTRAP)
|
||||||
|
{
|
||||||
|
audience_bobamp(mobj) = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// The following is derived from the default bobamp
|
||||||
|
if (mobj->type != MT_EMBLEM && !(mobj->flags & MF_NOGRAVITY) && followers[followerpick].bobamp < 4*FRACUNIT)
|
||||||
|
{
|
||||||
|
audience_bobamp(mobj) = 4*mobj->scale;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
audience_bobamp(mobj) = FixedMul(mobj->scale, followers[followerpick].bobamp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
audience_mainstate(mobj) =
|
||||||
|
audience_bobamp(mobj) != 0
|
||||||
|
? followers[followerpick].followstate
|
||||||
|
: followers[followerpick].idlestate;
|
||||||
|
|
||||||
P_SetMobjState(mobj, audience_mainstate(mobj));
|
P_SetMobjState(mobj, audience_mainstate(mobj));
|
||||||
if (P_MobjWasRemoved(mobj))
|
if (P_MobjWasRemoved(mobj))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// The following is derived from the default bobamp
|
|
||||||
if (mobj->type != MT_EMBLEM && !(mobj->flags & MF_NOGRAVITY) && followers[followerpick].bobamp < 4*FRACUNIT)
|
|
||||||
{
|
|
||||||
audience_bobamp(mobj) = 4*mobj->scale;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
audience_bobamp(mobj) = FixedMul(mobj->scale, followers[followerpick].bobamp);
|
|
||||||
}
|
|
||||||
|
|
||||||
audience_bobspeed(mobj) = followers[followerpick].bobspeed;
|
|
||||||
audience_focusplayer(mobj) = MAXPLAYERS;
|
|
||||||
|
|
||||||
if (P_RandomChance(PR_RANDOMAUDIENCE, FRACUNIT/2))
|
if (P_RandomChance(PR_RANDOMAUDIENCE, FRACUNIT/2))
|
||||||
{
|
{
|
||||||
audience_animoffset(mobj) = 5;
|
audience_animoffset(mobj) = 5;
|
||||||
|
|
|
||||||
|
|
@ -13192,11 +13192,16 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj)
|
||||||
}
|
}
|
||||||
case MT_RANDOMAUDIENCE:
|
case MT_RANDOMAUDIENCE:
|
||||||
{
|
{
|
||||||
if (mthing->args[2] != 0)
|
if (mthing->args[2] & TMAUDIM_FLOAT)
|
||||||
{
|
{
|
||||||
mobj->flags |= MF_NOGRAVITY;
|
mobj->flags |= MF_NOGRAVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mthing->args[2] & TMAUDIM_BORED)
|
||||||
|
{
|
||||||
|
mobj->flags2 |= MF2_BOSSNOTRAP;
|
||||||
|
}
|
||||||
|
|
||||||
if (mthing->args[3] != 0)
|
if (mthing->args[3] != 0)
|
||||||
{
|
{
|
||||||
mobj->flags2 |= MF2_AMBUSH;
|
mobj->flags2 |= MF2_AMBUSH;
|
||||||
|
|
|
||||||
|
|
@ -6959,7 +6959,11 @@ static void P_ConvertBinaryThingTypes(void)
|
||||||
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
|
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
|
||||||
break;
|
break;
|
||||||
case 1488: // Follower Audience (unfortunately numbered)
|
case 1488: // Follower Audience (unfortunately numbered)
|
||||||
mapthings[i].args[2] = !!(mapthings[i].options & MTF_OBJECTSPECIAL);
|
if (mapthings[i].options & MTF_OBJECTSPECIAL)
|
||||||
|
mapthings[i].args[2] |= TMAUDIM_FLOAT;
|
||||||
|
if (mapthings[i].options & MTF_EXTRA)
|
||||||
|
mapthings[i].args[2] |= TMAUDIM_BORED;
|
||||||
|
|
||||||
mapthings[i].args[3] = !!(mapthings[i].options & MTF_AMBUSH);
|
mapthings[i].args[3] = !!(mapthings[i].options & MTF_AMBUSH);
|
||||||
break;
|
break;
|
||||||
case 1500: //Glaregoyle
|
case 1500: //Glaregoyle
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,12 @@ typedef enum
|
||||||
TMWPF_FINISHLINE = 1<<3,
|
TMWPF_FINISHLINE = 1<<3,
|
||||||
} textmapwaypointflags_t;
|
} textmapwaypointflags_t;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
TMAUDIM_FLOAT = 1,
|
||||||
|
TMAUDIM_BORED = 1<<1,
|
||||||
|
} textmapaudiencemovementflags_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
TMBCF_BACKANDFORTH = 1,
|
TMBCF_BACKANDFORTH = 1,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue