Merge branch 'audience-polish' into 'master'

Adjust Audience bobbing, give them shadow

Closes #1194

See merge request KartKrew/Kart!2217
This commit is contained in:
Oni 2024-04-03 01:43:43 +00:00
commit 5dbee14281
2 changed files with 12 additions and 2 deletions

View file

@ -132,14 +132,15 @@ Obj_AudienceInit
} }
else else
{ {
fixed_t bobscale = mapobjectscale * 2;
// The following is derived from the default bobamp // The following is derived from the default bobamp
if (mobj->type != MT_EMBLEM && !(mobj->flags & MF_NOGRAVITY) && followers[followerpick].bobamp < 4*FRACUNIT) if (mobj->type != MT_EMBLEM && !(mobj->flags & MF_NOGRAVITY) && followers[followerpick].bobamp < 4*FRACUNIT)
{ {
audience_bobamp(mobj) = 4*mapobjectscale; audience_bobamp(mobj) = 4*bobscale;
} }
else else
{ {
audience_bobamp(mobj) = FixedMul(mapobjectscale, followers[followerpick].bobamp); audience_bobamp(mobj) = FixedMul(bobscale, followers[followerpick].bobamp);
} }
} }

View file

@ -518,6 +518,11 @@ boolean P_SetMobjState(mobj_t *mobj, statenum_t state)
for (;(state = seenstate[i]) > S_NULL; i = state - 1) for (;(state = seenstate[i]) > S_NULL; i = state - 1)
seenstate[i] = S_NULL; // erase memory of states seenstate[i] = S_NULL; // erase memory of states
// Shadow automatically turns white on fullbright frames.
// For now, only applies to Follower Audience.
if (mobj->type == MT_RANDOMAUDIENCE)
mobj->whiteshadow = (mobj->frame & FF_FULLBRIGHT) != 0;
return true; return true;
} }
@ -10694,6 +10699,10 @@ static void P_DefaultMobjShadowScale(mobj_t *thing)
case MT_AIRIVOBALL: case MT_AIRIVOBALL:
thing->shadowscale = FRACUNIT/2; thing->shadowscale = FRACUNIT/2;
break; break;
case MT_RANDOMAUDIENCE:
thing->shadowscale = FRACUNIT;
thing->whiteshadow = false;
break;
default: default:
if (thing->flags & (MF_ENEMY|MF_BOSS)) if (thing->flags & (MF_ENEMY|MF_BOSS))
thing->shadowscale = FRACUNIT; thing->shadowscale = FRACUNIT;