mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 13:40:45 +00:00
Merge branch 'team-elementalfire' into 'next'
Player-Colored Elemental Fire for competitive gametypes See merge request STJr/SRB2!1312
This commit is contained in:
commit
14c6d93c0c
5 changed files with 34 additions and 0 deletions
|
@ -1522,6 +1522,13 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
|||
"S_SPINFIRE5",
|
||||
"S_SPINFIRE6",
|
||||
|
||||
"S_TEAM_SPINFIRE1",
|
||||
"S_TEAM_SPINFIRE2",
|
||||
"S_TEAM_SPINFIRE3",
|
||||
"S_TEAM_SPINFIRE4",
|
||||
"S_TEAM_SPINFIRE5",
|
||||
"S_TEAM_SPINFIRE6",
|
||||
|
||||
// Spikes
|
||||
"S_SPIKE1",
|
||||
"S_SPIKE2",
|
||||
|
|
|
@ -253,6 +253,7 @@ light_t *t_lspr[NUMSPRITES] =
|
|||
&lspr[NOLIGHT], // SPR_SIGN
|
||||
&lspr[NOLIGHT], // SPR_SPIK
|
||||
&lspr[NOLIGHT], // SPR_SFLM
|
||||
&lspr[NOLIGHT], // SPR_TFLM
|
||||
&lspr[NOLIGHT], // SPR_USPK
|
||||
&lspr[NOLIGHT], // SPR_WSPK
|
||||
&lspr[NOLIGHT], // SPR_WSPB
|
||||
|
|
|
@ -150,6 +150,7 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
"SIGN", // Level end sign
|
||||
"SPIK", // Spike Ball
|
||||
"SFLM", // Spin fire
|
||||
"TFLM", // Spin fire (team)
|
||||
"USPK", // Floor spike
|
||||
"WSPK", // Wall spike
|
||||
"WSPB", // Wall spike base
|
||||
|
@ -1894,6 +1895,13 @@ state_t states[NUMSTATES] =
|
|||
{SPR_SFLM, FF_FULLBRIGHT|4, 2, {NULL}, 0, 0, S_SPINFIRE6}, // S_SPINFIRE5
|
||||
{SPR_SFLM, FF_FULLBRIGHT|5, 2, {NULL}, 0, 0, S_SPINFIRE1}, // S_SPINFIRE6
|
||||
|
||||
{SPR_TFLM, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_TEAM_SPINFIRE2}, // S_TEAM_SPINFIRE1
|
||||
{SPR_TFLM, FF_FULLBRIGHT|1, 2, {NULL}, 0, 0, S_TEAM_SPINFIRE3}, // S_TEAM_SPINFIRE2
|
||||
{SPR_TFLM, FF_FULLBRIGHT|2, 2, {NULL}, 0, 0, S_TEAM_SPINFIRE4}, // S_TEAM_SPINFIRE3
|
||||
{SPR_TFLM, FF_FULLBRIGHT|3, 2, {NULL}, 0, 0, S_TEAM_SPINFIRE5}, // S_TEAM_SPINFIRE4
|
||||
{SPR_TFLM, FF_FULLBRIGHT|4, 2, {NULL}, 0, 0, S_TEAM_SPINFIRE6}, // S_TEAM_SPINFIRE5
|
||||
{SPR_TFLM, FF_FULLBRIGHT|5, 2, {NULL}, 0, 0, S_TEAM_SPINFIRE1}, // S_TEAM_SPINFIRE6
|
||||
|
||||
// Floor Spike
|
||||
{SPR_USPK, 0,-1, {A_SpikeRetract}, 1, 0, S_SPIKE2}, // S_SPIKE1 -- Fully extended
|
||||
{SPR_USPK, 1, 2, {A_Pain}, 0, 0, S_SPIKE3}, // S_SPIKE2
|
||||
|
|
|
@ -684,6 +684,7 @@ typedef enum sprite
|
|||
SPR_SIGN, // Level end sign
|
||||
SPR_SPIK, // Spike Ball
|
||||
SPR_SFLM, // Spin fire
|
||||
SPR_TFLM, // Spin fire (team)
|
||||
SPR_USPK, // Floor spike
|
||||
SPR_WSPK, // Wall spike
|
||||
SPR_WSPB, // Wall spike base
|
||||
|
@ -2324,6 +2325,13 @@ typedef enum state
|
|||
S_SPINFIRE5,
|
||||
S_SPINFIRE6,
|
||||
|
||||
S_TEAM_SPINFIRE1,
|
||||
S_TEAM_SPINFIRE2,
|
||||
S_TEAM_SPINFIRE3,
|
||||
S_TEAM_SPINFIRE4,
|
||||
S_TEAM_SPINFIRE5,
|
||||
S_TEAM_SPINFIRE6,
|
||||
|
||||
// Spikes
|
||||
S_SPIKE1,
|
||||
S_SPIKE2,
|
||||
|
|
10
src/p_user.c
10
src/p_user.c
|
@ -7756,6 +7756,11 @@ void P_ElementalFire(player_t *player, boolean cropcircle)
|
|||
flame->eflags = (flame->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP);
|
||||
P_InstaThrust(flame, flame->angle, FixedMul(3*FRACUNIT, flame->scale));
|
||||
P_SetObjectMomZ(flame, 3*FRACUNIT, false);
|
||||
if (!(gametyperules & GTR_FRIENDLY))
|
||||
{
|
||||
P_SetMobjState(flame, S_TEAM_SPINFIRE1);
|
||||
flame->color = player->mo->color;
|
||||
}
|
||||
}
|
||||
#undef limitangle
|
||||
#undef numangles
|
||||
|
@ -7783,6 +7788,11 @@ void P_ElementalFire(player_t *player, boolean cropcircle)
|
|||
flame->destscale = player->mo->scale;
|
||||
P_SetScale(flame, player->mo->scale);
|
||||
flame->eflags = (flame->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP);
|
||||
if (!(gametyperules & GTR_FRIENDLY))
|
||||
{
|
||||
P_SetMobjState(flame, S_TEAM_SPINFIRE1);
|
||||
flame->color = player->mo->color;
|
||||
}
|
||||
|
||||
flame->momx = 8; // this is a hack which is used to ensure it still behaves as a missile and can damage others
|
||||
P_XYMovement(flame);
|
||||
|
|
Loading…
Reference in a new issue