Commit 14c6d93c by James R.

Merge branch 'team-elementalfire' into 'next'

Player-Colored Elemental Fire for competitive gametypes See merge request !1312
parents 804e0495 f2095b57
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment