mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
BUBBLE BOUNCE ANIMATION
This commit is contained in:
parent
e107fe498b
commit
beecd72a22
4 changed files with 61 additions and 13 deletions
|
@ -5457,11 +5457,17 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_BUBS8",
|
||||
"S_BUBS9",
|
||||
|
||||
"S_BUBS10",
|
||||
"S_BUBS11",
|
||||
|
||||
"S_BUBSB1",
|
||||
"S_BUBSB2",
|
||||
"S_BUBSB3",
|
||||
"S_BUBSB4",
|
||||
|
||||
"S_BUBSB5",
|
||||
"S_BUBSB6",
|
||||
|
||||
"S_ZAPS1",
|
||||
"S_ZAPS2",
|
||||
"S_ZAPS3",
|
||||
|
|
22
src/info.c
22
src/info.c
|
@ -2096,6 +2096,7 @@ state_t states[NUMSTATES] =
|
|||
{SPR_MAGN, FF_FULLBRIGHT|FF_TRANS40| 9, 2, {NULL}, 0, 0, S_MAGN11}, // S_MAGN10
|
||||
{SPR_MAGN, FF_FULLBRIGHT|FF_TRANS40|10, 2, {NULL}, 0, 0, S_MAGN12}, // S_MAGN11
|
||||
{SPR_MAGN, FF_FULLBRIGHT|FF_TRANS40|11, 2, {NULL}, 0, 0, S_MAGN1 }, // S_MAGN12
|
||||
|
||||
{SPR_MAGN, FF_FULLBRIGHT|FF_TRANS10|12, 2, {NULL}, 0, 0, S_MAGN1 }, // S_MAGN13
|
||||
|
||||
{SPR_FORC, FF_TRANS50 , 3, {NULL}, 0, 0, S_FORC2 }, // S_FORC1
|
||||
|
@ -2141,6 +2142,7 @@ state_t states[NUMSTATES] =
|
|||
{SPR_ELEM, FF_FULLBRIGHT|17, 3, {NULL}, 0, 0, S_ELEMF7 }, // S_ELEMF6
|
||||
{SPR_ELEM, FF_FULLBRIGHT|18, 3, {NULL}, 0, 0, S_ELEMF8 }, // S_ELEMF7
|
||||
{SPR_ELEM, FF_FULLBRIGHT|19, 3, {NULL}, 0, 0, S_ELEMF1 }, // S_ELEMF8
|
||||
|
||||
{SPR_ELEM, FF_FULLBRIGHT|20, 1, {NULL}, 0, 0, S_ELEMF10}, // S_ELEMF9
|
||||
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_ELEMF1 }, // S_ELEMF10
|
||||
|
||||
|
@ -2185,10 +2187,16 @@ state_t states[NUMSTATES] =
|
|||
{SPR_BUBS, FF_TRANS30|7, 3, {NULL}, 0, 0, S_BUBS9}, // S_BUBS8
|
||||
{SPR_BUBS, FF_TRANS30|8, 3, {NULL}, 0, 0, S_BUBS1}, // S_BUBS9
|
||||
|
||||
{SPR_BUBS, FF_TRANS30| 9, 2, {NULL}, 0, 0, S_BUBSB2}, // S_BUBSB1
|
||||
{SPR_BUBS, FF_TRANS30|10, 2, {NULL}, 0, 0, S_BUBSB3}, // S_BUBSB2
|
||||
{SPR_BUBS, FF_TRANS30|11, 2, {NULL}, 0, 0, S_BUBSB4}, // S_BUBSB3
|
||||
{SPR_BUBS, FF_TRANS30|10, 2, {NULL}, 0, 0, S_BUBSB1}, // S_BUBSB4
|
||||
{SPR_NULL, 0, 3, {NULL}, 0, 0, S_BUBS1}, // S_BUBS10
|
||||
{SPR_NULL, 0, 4*3, {NULL}, 0, 0, S_BUBS1}, // S_BUBS11
|
||||
|
||||
{SPR_BUBS, FF_TRANS30| 9, 3, {NULL}, 0, 0, S_BUBSB2}, // S_BUBSB1
|
||||
{SPR_BUBS, FF_TRANS30|10, 3, {NULL}, 0, 0, S_BUBSB3}, // S_BUBSB2
|
||||
{SPR_BUBS, FF_TRANS30|11, 3, {NULL}, 0, 0, S_BUBSB4}, // S_BUBSB3
|
||||
{SPR_BUBS, FF_TRANS30|10, 3, {NULL}, 0, 0, S_BUBSB1}, // S_BUBSB4
|
||||
|
||||
{SPR_BUBS, FF_TRANS30|12, 3, {NULL}, 0, 0, S_BUBSB3}, // S_BUBSB5
|
||||
{SPR_BUBS, FF_TRANS30|13, 3, {NULL}, 0, 0, S_BUBSB5}, // S_BUBSB6
|
||||
|
||||
{SPR_ZAPS, FF_FULLBRIGHT|FF_TRANS20 , 2, {NULL}, 0, 0, S_ZAPS2 }, // S_ZAPS1
|
||||
{SPR_ZAPS, FF_FULLBRIGHT|FF_TRANS20| 1, 2, {NULL}, 0, 0, S_ZAPS3 }, // S_ZAPS2
|
||||
|
@ -10953,7 +10961,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
S_BUBSB5, // painstate
|
||||
SKINCOLOR_NONE, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
|
@ -10964,12 +10972,12 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
SH_BUBBLEWRAP, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
-2, // display offset
|
||||
2, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
S_BUBS10 // raisestate
|
||||
},
|
||||
|
||||
{ // MT_THUNDERCOIN_ORB
|
||||
|
|
|
@ -2371,11 +2371,17 @@ typedef enum state
|
|||
S_BUBS8,
|
||||
S_BUBS9,
|
||||
|
||||
S_BUBS10,
|
||||
S_BUBS11,
|
||||
|
||||
S_BUBSB1,
|
||||
S_BUBSB2,
|
||||
S_BUBSB3,
|
||||
S_BUBSB4,
|
||||
|
||||
S_BUBSB5,
|
||||
S_BUBSB6,
|
||||
|
||||
S_ZAPS1,
|
||||
S_ZAPS2,
|
||||
S_ZAPS3,
|
||||
|
|
40
src/p_mobj.c
40
src/p_mobj.c
|
@ -6782,7 +6782,6 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
case MT_ARMAGEDDON_ORB:
|
||||
case MT_FORCE_ORB:
|
||||
case MT_FLAMEAURA_ORB:
|
||||
case MT_BUBBLEWRAP_ORB:
|
||||
if (!P_AddShield(mobj))
|
||||
return;
|
||||
break;
|
||||
|
@ -6791,7 +6790,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
return;
|
||||
if (/*(mobj->target) -- the following is implicit by P_AddShield
|
||||
&& (mobj->target->player)
|
||||
&&*/ (mobj->target->player->homing))
|
||||
&& */ (mobj->target->player->homing))
|
||||
{
|
||||
P_SetMobjState(mobj, mobj->info->painstate);
|
||||
mobj->tics++;
|
||||
|
@ -6803,21 +6802,50 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
if (mobj->tracer
|
||||
/* && mobj->target -- the following is implicit by P_AddShield
|
||||
&& mobj->target->player
|
||||
&& (mobj->target->player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL*/
|
||||
&& (mobj->target->player->pflags & PF_SHIELDABILITY)
|
||||
&& (mobj->tracer->state->nextstate < mobj->info->raisestate))
|
||||
&& (mobj->target->player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL */
|
||||
&& mobj->target->player->pflags & PF_SHIELDABILITY
|
||||
&& ((statenum_t)(mobj->tracer->state-states) < mobj->info->raisestate
|
||||
|| (mobj->tracer->state->nextstate < mobj->info->raisestate && mobj->tracer->tics == 1)))
|
||||
{
|
||||
P_SetMobjState(mobj->tracer, mobj->info->raisestate);
|
||||
mobj->tracer->tics++;
|
||||
}
|
||||
break;
|
||||
case MT_BUBBLEWRAP_ORB:
|
||||
if (!P_AddShield(mobj))
|
||||
return;
|
||||
if (mobj->tracer
|
||||
/* && mobj->target -- the following is implicit by P_AddShield
|
||||
&& mobj->target->player
|
||||
&& (mobj->target->player->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP */
|
||||
)
|
||||
{
|
||||
if (mobj->target->player->pflags & PF_SHIELDABILITY
|
||||
&& ((statenum_t)(mobj->state-states) < mobj->info->painstate
|
||||
|| (mobj->state->nextstate < mobj->info->painstate && mobj->tics == 1)))
|
||||
{
|
||||
P_SetMobjState(mobj, mobj->info->painstate);
|
||||
mobj->tics++;
|
||||
P_SetMobjState(mobj->tracer, mobj->info->raisestate);
|
||||
mobj->tracer->tics++;
|
||||
}
|
||||
else if (mobj->target->eflags & MFE_JUSTHITFLOOR
|
||||
&& (statenum_t)(mobj->state-states) == mobj->info->painstate)
|
||||
{
|
||||
P_SetMobjState(mobj, mobj->info->painstate+1);
|
||||
mobj->tics++;
|
||||
P_SetMobjState(mobj->tracer, mobj->info->raisestate+1);
|
||||
mobj->tracer->tics++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MT_THUNDERCOIN_ORB:
|
||||
if (!P_AddShield(mobj))
|
||||
return;
|
||||
if (mobj->tracer
|
||||
/* && mobj->target -- the following is implicit by P_AddShield
|
||||
&& mobj->target->player
|
||||
&& (mobj->target->player->powers[pw_shield] & SH_NOSTACK) == SH_THUNDERCOIN*/
|
||||
&& (mobj->target->player->powers[pw_shield] & SH_NOSTACK) == SH_THUNDERCOIN */
|
||||
&& (mobj->target->player->pflags & PF_SHIELDABILITY))
|
||||
{
|
||||
P_SetMobjState(mobj, mobj->info->painstate);
|
||||
|
|
Loading…
Reference in a new issue