mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Implement new states for Buggle, the new Aquabuzz
This commit is contained in:
parent
97dd22e0e9
commit
9436993a3e
5 changed files with 18 additions and 13 deletions
|
@ -7253,8 +7253,8 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_BUMBLEBORE_STUCK2",
|
"S_BUMBLEBORE_STUCK2",
|
||||||
"S_BUMBLEBORE_DIE",
|
"S_BUMBLEBORE_DIE",
|
||||||
|
|
||||||
"S_BBUZZFLY1",
|
"S_BUGGLEIDLE",
|
||||||
"S_BBUZZFLY2",
|
"S_BUGGLEFLY",
|
||||||
|
|
||||||
"S_SMASHSPIKE_FLOAT",
|
"S_SMASHSPIKE_FLOAT",
|
||||||
"S_SMASHSPIKE_EASE1",
|
"S_SMASHSPIKE_EASE1",
|
||||||
|
@ -8093,7 +8093,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
"MT_HIVEELEMENTAL",
|
"MT_HIVEELEMENTAL",
|
||||||
"MT_BUMBLEBORE",
|
"MT_BUMBLEBORE",
|
||||||
|
|
||||||
"MT_BUBBLEBUZZ",
|
"MT_BUGGLE",
|
||||||
|
|
||||||
"MT_SMASHINGSPIKEBALL",
|
"MT_SMASHINGSPIKEBALL",
|
||||||
"MT_CACOLANTERN",
|
"MT_CACOLANTERN",
|
||||||
|
|
10
src/info.c
10
src/info.c
|
@ -3863,8 +3863,8 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_BUMB, 5, 120, {NULL}, 0, 0, S_BUMBLEBORE_DIE}, // S_BUMBLEBORE_STUCK2
|
{SPR_BUMB, 5, 120, {NULL}, 0, 0, S_BUMBLEBORE_DIE}, // S_BUMBLEBORE_STUCK2
|
||||||
{SPR_BUMB, 5, 0, {A_CryingToMomma}, 0, 0, S_XPLD1}, // S_BUMBLEBORE_DIE
|
{SPR_BUMB, 5, 0, {A_CryingToMomma}, 0, 0, S_XPLD1}, // S_BUMBLEBORE_DIE
|
||||||
|
|
||||||
{SPR_BBUZ, 0, 2, {NULL}, 0, 0, S_BBUZZFLY2}, // S_BBUZZFLY1
|
{SPR_BBUZ, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BUGGLEIDLE
|
||||||
{SPR_BBUZ, 1, 2, {NULL}, 0, 0, S_BBUZZFLY1}, // S_BBUZZFLY2
|
{SPR_BBUZ, FF_ANIMATE, -1, {NULL}, 1, 2, S_NULL}, // S_BUGGLEFLY
|
||||||
|
|
||||||
{SPR_FMCE, 0, 20, {NULL}, 0, 0, S_SMASHSPIKE_EASE1}, // S_SMASHSPIKE_FLOAT
|
{SPR_FMCE, 0, 20, {NULL}, 0, 0, S_SMASHSPIKE_EASE1}, // S_SMASHSPIKE_FLOAT
|
||||||
{SPR_FMCE, 0, 4, {A_ZThrust}, 4, (1<<16)|1, S_SMASHSPIKE_EASE2}, // S_SMASHSPIKE_EASE1
|
{SPR_FMCE, 0, 4, {A_ZThrust}, 4, (1<<16)|1, S_SMASHSPIKE_EASE2}, // S_SMASHSPIKE_EASE1
|
||||||
|
@ -20128,11 +20128,11 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // MT_BUBBLEBUZZ
|
{ // MT_BUGGLE
|
||||||
124, // doomednum
|
124, // doomednum
|
||||||
S_BBUZZFLY1, // spawnstate
|
S_BUGGLEIDLE, // spawnstate
|
||||||
1, // spawnhealth
|
1, // spawnhealth
|
||||||
S_BBUZZFLY1, // seestate
|
S_BUGGLEFLY, // seestate
|
||||||
sfx_None, // seesound
|
sfx_None, // seesound
|
||||||
2, // reactiontime
|
2, // reactiontime
|
||||||
sfx_None, // attacksound
|
sfx_None, // attacksound
|
||||||
|
|
|
@ -3927,8 +3927,8 @@ typedef enum state
|
||||||
S_BUMBLEBORE_STUCK2,
|
S_BUMBLEBORE_STUCK2,
|
||||||
S_BUMBLEBORE_DIE,
|
S_BUMBLEBORE_DIE,
|
||||||
|
|
||||||
S_BBUZZFLY1,
|
S_BUGGLEIDLE,
|
||||||
S_BBUZZFLY2,
|
S_BUGGLEFLY,
|
||||||
|
|
||||||
S_SMASHSPIKE_FLOAT,
|
S_SMASHSPIKE_FLOAT,
|
||||||
S_SMASHSPIKE_EASE1,
|
S_SMASHSPIKE_EASE1,
|
||||||
|
@ -4789,7 +4789,7 @@ typedef enum mobj_type
|
||||||
MT_HIVEELEMENTAL,
|
MT_HIVEELEMENTAL,
|
||||||
MT_BUMBLEBORE,
|
MT_BUMBLEBORE,
|
||||||
|
|
||||||
MT_BUBBLEBUZZ,
|
MT_BUGGLE,
|
||||||
|
|
||||||
MT_SMASHINGSPIKEBALL,
|
MT_SMASHINGSPIKEBALL,
|
||||||
MT_CACOLANTERN,
|
MT_CACOLANTERN,
|
||||||
|
|
|
@ -2615,7 +2615,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
||||||
target->fuse = target->info->damage;
|
target->fuse = target->info->damage;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MT_BUBBLEBUZZ:
|
case MT_BUGGLE:
|
||||||
if (inflictor && inflictor->player // did a player kill you? Spawn relative to the player so they're bound to get it
|
if (inflictor && inflictor->player // did a player kill you? Spawn relative to the player so they're bound to get it
|
||||||
&& P_AproxDistance(inflictor->x - target->x, inflictor->y - target->y) <= inflictor->radius + target->radius + FixedMul(8*FRACUNIT, inflictor->scale) // close enough?
|
&& P_AproxDistance(inflictor->x - target->x, inflictor->y - target->y) <= inflictor->radius + target->radius + FixedMul(8*FRACUNIT, inflictor->scale) // close enough?
|
||||||
&& inflictor->z <= target->z + target->height + FixedMul(8*FRACUNIT, inflictor->scale)
|
&& inflictor->z <= target->z + target->height + FixedMul(8*FRACUNIT, inflictor->scale)
|
||||||
|
|
|
@ -8406,7 +8406,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MT_BUBBLEBUZZ:
|
case MT_BUGGLE:
|
||||||
mobj->eflags |= MFE_UNDERWATER; //P_MobjCheckWater(mobj); // solely for MFE_UNDERWATER for A_FlickySpawn
|
mobj->eflags |= MFE_UNDERWATER; //P_MobjCheckWater(mobj); // solely for MFE_UNDERWATER for A_FlickySpawn
|
||||||
{
|
{
|
||||||
if (mobj->tracer && mobj->tracer->player && mobj->tracer->health > 0
|
if (mobj->tracer && mobj->tracer->player && mobj->tracer->health > 0
|
||||||
|
@ -8420,6 +8420,9 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
|
|
||||||
if (leveltime % mobj->info->painchance == 0)
|
if (leveltime % mobj->info->painchance == 0)
|
||||||
S_StartSound(mobj, mobj->info->activesound);
|
S_StartSound(mobj, mobj->info->activesound);
|
||||||
|
|
||||||
|
if ((statenum_t)(mobj->state-states) != mobj->info->seestate)
|
||||||
|
P_SetMobjState(mobj, mobj->info->seestate);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -8428,6 +8431,8 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
mobj->momx >>= 1;
|
mobj->momx >>= 1;
|
||||||
mobj->momy >>= 1;
|
mobj->momy >>= 1;
|
||||||
mobj->momz >>= 1;
|
mobj->momz >>= 1;
|
||||||
|
if ((statenum_t)(mobj->state-states) != mobj->info->spawnstate)
|
||||||
|
P_SetMobjState(mobj, mobj->info->spawnstate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue