mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Display Eggman more frequently during skin roulette
This commit is contained in:
parent
eb6d3b3dbe
commit
cf39e181bb
5 changed files with 34 additions and 32 deletions
|
@ -5387,9 +5387,12 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
|
||||
// Level End Sign
|
||||
"S_SIGN",
|
||||
"S_SIGNSPIN",
|
||||
"S_SIGNSPINLOOP",
|
||||
"S_SIGNROULETTE",
|
||||
"S_SIGNSPIN1",
|
||||
"S_SIGNSPIN2",
|
||||
"S_SIGNSPIN3",
|
||||
"S_SIGNSPIN4",
|
||||
"S_SIGNSPIN5",
|
||||
"S_SIGNSPIN6",
|
||||
"S_SIGNPLAYER",
|
||||
"S_SIGNBOARD",
|
||||
"S_EGGMANSIGN",
|
||||
|
|
|
@ -1926,9 +1926,12 @@ state_t states[NUMSTATES] =
|
|||
|
||||
// Level End Sign
|
||||
{SPR_SIGN, 0, -1, {A_SignPlayer}, -3, 0, S_NULL}, // S_SIGN
|
||||
{SPR_SIGN, 0, 1, {A_SignSpin}, 30, 0, S_SIGNSPINLOOP}, // S_SIGNSPIN
|
||||
{SPR_SIGN, 0, 0, {A_Repeat}, 4, S_SIGNSPIN, S_SIGNROULETTE}, // S_SIGNSPINLOOP
|
||||
{SPR_SIGN, 0, 0, {A_SignPlayer}, -2, 0, S_SIGNSPIN}, // S_SIGNROULETTE
|
||||
{SPR_SIGN, 0, 1, {A_SignSpin}, 30, 0, S_SIGNSPIN2}, // S_SIGNSPIN1
|
||||
{SPR_SIGN, 0, 0, {A_Repeat}, 4, S_SIGNSPIN1, S_SIGNSPIN3}, // S_SIGNSPIN2
|
||||
{SPR_SIGN, 0, 0, {A_SignPlayer}, -2, 0, S_SIGNSPIN4}, // S_SIGNSPIN3
|
||||
{SPR_SIGN, 0, 1, {A_SignSpin}, 30, 0, S_SIGNSPIN5}, // S_SIGNSPIN4
|
||||
{SPR_SIGN, 0, 0, {A_Repeat}, 4, S_SIGNSPIN4, S_SIGNSPIN6}, // S_SIGNSPIN5
|
||||
{SPR_SIGN, 0, 0, {A_SignPlayer}, -3, 0, S_SIGNSPIN1}, // S_SIGNSPIN6
|
||||
{SPR_SIGN, 0, 1, {A_SignPlayer}, -1, 0, S_SIGNSLOW}, // S_SIGNPLAYER
|
||||
{SPR_SIGN, 0, 1, {A_SignSpin}, 30, 0, S_SIGNSLOW}, // S_SIGNSLOW
|
||||
{SPR_SIGN, 0, -1, {NULL}, 0, 0, S_NULL}, // S_SIGNSTOP
|
||||
|
|
|
@ -2060,9 +2060,12 @@ typedef enum state
|
|||
|
||||
// Level End Sign
|
||||
S_SIGN,
|
||||
S_SIGNSPIN,
|
||||
S_SIGNSPINLOOP,
|
||||
S_SIGNROULETTE,
|
||||
S_SIGNSPIN1,
|
||||
S_SIGNSPIN2,
|
||||
S_SIGNSPIN3,
|
||||
S_SIGNSPIN4,
|
||||
S_SIGNSPIN5,
|
||||
S_SIGNSPIN6,
|
||||
S_SIGNPLAYER,
|
||||
S_SIGNSLOW,
|
||||
S_SIGNSTOP,
|
||||
|
|
|
@ -5136,17 +5136,14 @@ void A_SignPlayer(mobj_t *actor)
|
|||
// I turned this function into a fucking mess. I'm so sorry. -Lach
|
||||
if (locvar1 == -2) // next skin
|
||||
{
|
||||
if (ov->skin == NULL) // start at Sonic
|
||||
skin = &skins[0];
|
||||
else
|
||||
if (ov->skin == NULL) // pick a random skin to start with!
|
||||
skin = &skins[P_RandomKey(numskins)];
|
||||
else // otherwise, advance 1 skin
|
||||
{
|
||||
UINT8 skinnum = (skin_t*)ov->skin-skins + 1;
|
||||
UINT8 skinnum = (skin_t*)ov->skin-skins;
|
||||
player_t *player = actor->target ? actor->target->player : NULL;
|
||||
while (skinnum < numskins && (player ? !R_SkinUsable(player-players, skinnum) : skins[skinnum].availability > 0))
|
||||
skinnum++;
|
||||
if (skinnum < numskins)
|
||||
skin = &skins[skinnum];
|
||||
// leave skin NULL if we go past the skin count, this will display Eggman
|
||||
while ((skinnum = (skinnum + 1) % numskins) && (player ? !R_SkinUsable(player-players, skinnum) : skins[skinnum].availability > 0));
|
||||
skin = &skins[skinnum];
|
||||
}
|
||||
}
|
||||
else // specific skin
|
||||
|
@ -5154,19 +5151,16 @@ void A_SignPlayer(mobj_t *actor)
|
|||
skin = &skins[locvar1];
|
||||
}
|
||||
|
||||
if (skin != NULL) // if not Eggman, get the appropriate colors
|
||||
facecolor = skin->prefcolor;
|
||||
if (skin->prefoppositecolor)
|
||||
{
|
||||
facecolor = skin->prefcolor;
|
||||
if (skin->prefoppositecolor)
|
||||
{
|
||||
signcolor = skin->prefoppositecolor;
|
||||
}
|
||||
else
|
||||
{
|
||||
signcolor = Color_Opposite[facecolor - 1][0];
|
||||
}
|
||||
signframe += (15 - Color_Opposite[Color_Opposite[signcolor - 1][0] - 1][1]);
|
||||
signcolor = skin->prefoppositecolor;
|
||||
}
|
||||
else
|
||||
{
|
||||
signcolor = Color_Opposite[facecolor - 1][0];
|
||||
}
|
||||
signframe += (15 - Color_Opposite[Color_Opposite[signcolor - 1][0] - 1][1]);
|
||||
}
|
||||
|
||||
if (skin != NULL && skin->sprites[SPR2_SIGN].numframes) // player face
|
||||
|
@ -5180,7 +5174,6 @@ void A_SignPlayer(mobj_t *actor)
|
|||
else // Eggman face
|
||||
{
|
||||
ov->color = SKINCOLOR_NONE;
|
||||
ov->skin = NULL;
|
||||
P_SetMobjState(ov, actor->info->meleestate); // S_EGGMANSIGN
|
||||
actor->tracer->color = signcolor = SKINCOLOR_CARBON;
|
||||
actor->tracer->frame = signframe += (15 - Color_Opposite[Color_Opposite[signcolor - 1][0] - 1][1]);
|
||||
|
|
|
@ -4059,7 +4059,7 @@ void P_SetupSignExit(player_t *player)
|
|||
|
||||
P_SetTarget(&thing->target, player->mo);
|
||||
P_SetObjectMomZ(thing, 12*FRACUNIT, false);
|
||||
P_SetMobjState(thing, S_SIGNSPIN);
|
||||
P_SetMobjState(thing, S_SIGNSPIN1);
|
||||
if (thing->info->seesound)
|
||||
S_StartSound(thing, thing->info->seesound);
|
||||
|
||||
|
@ -4085,7 +4085,7 @@ void P_SetupSignExit(player_t *player)
|
|||
|
||||
P_SetTarget(&thing->target, player->mo);
|
||||
P_SetObjectMomZ(thing, 12*FRACUNIT, false);
|
||||
P_SetMobjState(thing, S_SIGNSPIN);
|
||||
P_SetMobjState(thing, S_SIGNSPIN1);
|
||||
if (thing->info->seesound)
|
||||
S_StartSound(thing, thing->info->seesound);
|
||||
|
||||
|
|
Loading…
Reference in a new issue