mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
Paper sign tweaks.
* Add "twinkling" and "landing sounds to paper signpost. * Fix whitespace on definitions. * It says locvar2 is unused in the comment for A_SignSpin, but it's used for the "doesn't have a spawnpoint" thing. Make it deathstate instead, so the object doesn't disappear.
This commit is contained in:
parent
d591554a5d
commit
471ae8ecb4
3 changed files with 27 additions and 17 deletions
28
src/info.c
28
src/info.c
|
@ -1911,18 +1911,18 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_BBLS, 3, 8, {A_BubbleCheck}, 0, 0, S_BUBBLES1}, // S_BUBBLES4
|
{SPR_BBLS, 3, 8, {A_BubbleCheck}, 0, 0, S_BUBBLES1}, // S_BUBBLES4
|
||||||
|
|
||||||
// Level End Sign
|
// Level End Sign
|
||||||
{SPR_SIGN, 0, -1, {A_SignPlayer}, -3, 0, S_NULL}, // S_SIGN
|
{SPR_SIGN, 0, -1, {A_SignPlayer}, -3, 0, S_NULL}, // S_SIGN
|
||||||
{SPR_SIGN, 0, 1, {A_SignSpin}, 30, 0, S_SIGNSPIN2}, // S_SIGNSPIN1
|
{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_Repeat}, 4, S_SIGNSPIN1, S_SIGNSPIN3}, // S_SIGNSPIN2
|
||||||
{SPR_SIGN, 0, 0, {A_SignPlayer}, -2, 0, S_SIGNSPIN4}, // S_SIGNSPIN3
|
{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, 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_Repeat}, 4, S_SIGNSPIN4, S_SIGNSPIN6}, // S_SIGNSPIN5
|
||||||
{SPR_SIGN, 0, 0, {A_SignPlayer}, -3, 0, S_SIGNSPIN1}, // S_SIGNSPIN6
|
{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_SignPlayer}, -1, 0, S_SIGNSLOW}, // S_SIGNPLAYER
|
||||||
{SPR_SIGN, 0, 1, {A_SignSpin}, 30, 0, S_SIGNSLOW}, // S_SIGNSLOW
|
{SPR_SIGN, 0, 1, {A_SignSpin}, 30, 0, S_SIGNSLOW}, // S_SIGNSLOW
|
||||||
{SPR_SIGN, 0, -1, {NULL}, 0, 0, S_NULL}, // S_SIGNSTOP
|
{SPR_SIGN, 0, -1, {NULL}, 0, 0, S_NULL}, // S_SIGNSTOP
|
||||||
{SPR_SIGN, FF_PAPERSPRITE|2, -1, {NULL}, 0, 0, S_NULL}, // S_SIGNBOARD
|
{SPR_SIGN, FF_PAPERSPRITE|2, -1, {NULL}, 0, 0, S_NULL}, // S_SIGNBOARD
|
||||||
{SPR_SIGN, FF_PAPERSPRITE|1, -1, {NULL}, 0, 29, S_NULL}, // S_EGGMANSIGN
|
{SPR_SIGN, FF_PAPERSPRITE|1, -1, {NULL}, 0, 29, S_NULL}, // S_EGGMANSIGN
|
||||||
|
|
||||||
// Spike Ball
|
// Spike Ball
|
||||||
{SPR_SPIK, 0, 1, {NULL}, 0, 0, S_SPIKEBALL2}, // S_SPIKEBALL1
|
{SPR_SPIK, 0, 1, {NULL}, 0, 0, S_SPIKEBALL2}, // S_SPIKEBALL1
|
||||||
|
@ -7794,12 +7794,12 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
sfx_None, // attacksound
|
sfx_None, // attacksound
|
||||||
S_SIGNPLAYER, // painstate
|
S_SIGNPLAYER, // painstate
|
||||||
MT_SPARK, // painchance
|
MT_SPARK, // painchance
|
||||||
sfx_None, // painsound
|
sfx_s3kb8, // painsound
|
||||||
S_EGGMANSIGN, // meleestate
|
S_EGGMANSIGN, // meleestate
|
||||||
S_NULL, // missilestate
|
S_NULL, // missilestate
|
||||||
S_SIGNSTOP, // deathstate
|
S_SIGNSTOP, // deathstate
|
||||||
S_NULL, // xdeathstate
|
S_NULL, // xdeathstate
|
||||||
sfx_None, // deathsound
|
sfx_s3k64, // deathsound
|
||||||
8, // speed
|
8, // speed
|
||||||
36*FRACUNIT, // radius
|
36*FRACUNIT, // radius
|
||||||
32*FRACUNIT, // height
|
32*FRACUNIT, // height
|
||||||
|
|
|
@ -5031,7 +5031,6 @@ void A_UnsetSolidSteam(mobj_t *actor)
|
||||||
void A_SignSpin(mobj_t *actor)
|
void A_SignSpin(mobj_t *actor)
|
||||||
{
|
{
|
||||||
INT32 locvar1 = var1;
|
INT32 locvar1 = var1;
|
||||||
INT32 locvar2 = var2;
|
|
||||||
INT16 i;
|
INT16 i;
|
||||||
angle_t rotateangle = FixedAngle(locvar1 << FRACBITS);
|
angle_t rotateangle = FixedAngle(locvar1 << FRACBITS);
|
||||||
|
|
||||||
|
@ -5042,6 +5041,11 @@ void A_SignSpin(mobj_t *actor)
|
||||||
|
|
||||||
if (P_IsObjectOnGround(actor) && P_MobjFlip(actor) * actor->momz <= 0)
|
if (P_IsObjectOnGround(actor) && P_MobjFlip(actor) * actor->momz <= 0)
|
||||||
{
|
{
|
||||||
|
if (actor->flags2 & MF2_BOSSFLEE)
|
||||||
|
{
|
||||||
|
S_StartSound(actor, actor->info->deathsound);
|
||||||
|
actor->flags2 &= ~MF2_BOSSFLEE;
|
||||||
|
}
|
||||||
if (actor->spawnpoint)
|
if (actor->spawnpoint)
|
||||||
{
|
{
|
||||||
angle_t mapangle = FixedAngle(actor->spawnpoint->angle << FRACBITS);
|
angle_t mapangle = FixedAngle(actor->spawnpoint->angle << FRACBITS);
|
||||||
|
@ -5058,14 +5062,20 @@ void A_SignSpin(mobj_t *actor)
|
||||||
}
|
}
|
||||||
else // no mapthing? just finish in your current angle
|
else // no mapthing? just finish in your current angle
|
||||||
{
|
{
|
||||||
P_SetMobjState(actor, locvar2);
|
P_SetMobjState(actor, actor->info->deathstate);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (!(actor->flags2 & MF2_BOSSFLEE))
|
||||||
|
{
|
||||||
|
S_StartSound(actor, actor->info->painsound);
|
||||||
|
actor->flags2 |= MF2_BOSSFLEE;
|
||||||
|
}
|
||||||
actor->movedir = rotateangle;
|
actor->movedir = rotateangle;
|
||||||
}
|
}
|
||||||
|
|
||||||
actor->angle += actor->movedir;
|
actor->angle += actor->movedir;
|
||||||
if (actor->tracer == NULL || P_MobjWasRemoved(actor->tracer)) return;
|
if (actor->tracer == NULL || P_MobjWasRemoved(actor->tracer)) return;
|
||||||
for (i = -1; i < 2; i += 2)
|
for (i = -1; i < 2; i += 2)
|
||||||
|
|
|
@ -578,7 +578,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s3kb5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Clink"},
|
{"s3kb5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Clink"},
|
||||||
{"s3kb6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spin launch"},
|
{"s3kb6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spin launch"},
|
||||||
{"s3kb7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Tumbler"},
|
{"s3kb7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Tumbler"},
|
||||||
{"s3kb8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Falling signpost"},
|
{"s3kb8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spinning signpost"},
|
||||||
{"s3kb9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ring loss"},
|
{"s3kb9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ring loss"},
|
||||||
{"s3kba", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flight"},
|
{"s3kba", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flight"},
|
||||||
{"s3kbb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Tired flight"},
|
{"s3kbb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Tired flight"},
|
||||||
|
|
Loading…
Reference in a new issue