Merge branch 'poledance' into 'master'

Make ACZ3's slapstick signpost taller (resolves #267).

Closes #267

See merge request STJr/SRB2Internal!473
This commit is contained in:
MascaraSnake 2019-11-18 15:14:48 -05:00
commit 7a48a8d72d
5 changed files with 31 additions and 18 deletions

View File

@ -5345,6 +5345,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_FSGNA",
"S_FSGNB",
"S_FSGNC",
"S_FSGND",
// Black Eggman (Boss 7)
"S_BLACKEGG_STND",

View File

@ -1487,6 +1487,7 @@ state_t states[NUMSTATES] =
{SPR_FSGN, 0|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_FSGNA
{SPR_FSGN, 1|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_FSGNB
{SPR_FSGN, 2|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_FSGNC
{SPR_FSGN, 3|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_FSGND
// Black Eggman (Boss 7)
{SPR_BRAK, 0, 1, {A_SetReactionTime}, 0, 0, S_BLACKEGG_STND2}, // S_BLACKEGG_STND
@ -6115,11 +6116,11 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // meleestate
S_NULL, // missilestate
S_FSGNC, // deathstate
S_NULL, // xdeathstate
S_FSGND, // xdeathstate
sfx_None, // deathsound
0, // speed
124*FRACUNIT, // radius
640*FRACUNIT, // height
74*FRACUNIT, // radius
320*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage

View File

@ -1657,6 +1657,7 @@ typedef enum state
S_FSGNA,
S_FSGNB,
S_FSGNC,
S_FSGND,
// Black Eggman (Boss 7)
S_BLACKEGG_STND,

View File

@ -4070,19 +4070,28 @@ bossjustdie:
mobj_t *pole = P_SpawnMobj(
mo->tracer->x - P_ReturnThrustX(mo->tracer, mo->tracer->angle, speed*time),
mo->tracer->y - P_ReturnThrustY(mo->tracer, mo->tracer->angle, speed*time),
mo->tracer->floorz + 4*FRACUNIT,
mo->tracer->floorz + (256+1)*FRACUNIT,
MT_FSGNB);
P_SetTarget(&pole->tracer, P_SpawnMobj(
pole->x, pole->y,
pole->z - 256*FRACUNIT,
MT_FSGNB));
P_SetTarget(&pole->tracer->tracer, P_SpawnMobj(
pole->x + P_ReturnThrustX(pole, mo->tracer->angle, FRACUNIT),
pole->y + P_ReturnThrustY(pole, mo->tracer->angle, FRACUNIT),
pole->z + 256*FRACUNIT,
MT_FSGNA));
pole->angle = mo->tracer->angle;
pole->tracer->angle = pole->angle - ANGLE_90;
pole->tracer->flags |= MF_NOCLIPTHING;
P_SetScale(pole, (pole->destscale = 2*FRACUNIT));
P_SetScale(pole->tracer, (pole->tracer->destscale = 2*FRACUNIT));
pole->angle = pole->tracer->angle = mo->tracer->angle;
pole->tracer->tracer->angle = pole->angle - ANGLE_90;
pole->momx = P_ReturnThrustX(pole, pole->angle, speed);
pole->momy = P_ReturnThrustY(pole, pole->angle, speed);
pole->tracer->momx = pole->momx;
pole->tracer->momy = pole->momy;
pole->tracer->tracer->momx = pole->momx;
pole->tracer->tracer->momy = pole->momy;
}
}
else

View File

@ -664,31 +664,32 @@ static void P_SlapStick(mobj_t *fang, mobj_t *pole)
momx2 = fang->momx/dist;
momy2 = fang->momy/dist;
pole->tracer->momx = momx1 + (dist-1)*momx2;
pole->tracer->momy = momy1 + (dist-1)*momy2;
pole->tracer->tracer->momx = momx1 + (dist-1)*momx2;
pole->tracer->tracer->momy = momy1 + (dist-1)*momy2;
fang->momx = (dist-1)*momx1 + momx2;
fang->momy = (dist-1)*momy1 + momy2;
#undef dist
P_SetMobjState(pole, pole->info->deathstate);
P_SetObjectMomZ(pole->tracer, 6*FRACUNIT, false);
pole->tracer->flags &= ~(MF_NOGRAVITY|MF_NOCLIP);
pole->tracer->movedir = ANGLE_67h;
if ((R_PointToAngle(fang->x - pole->tracer->x, fang->y - pole->tracer->y) - pole->angle) > ANGLE_180)
pole->tracer->movedir = InvAngle(pole->tracer->movedir);
P_SetObjectMomZ(pole->tracer->tracer, 6*FRACUNIT, false);
pole->tracer->tracer->flags &= ~(MF_NOGRAVITY|MF_NOCLIP);
pole->tracer->tracer->movedir = ANGLE_67h;
if ((R_PointToAngle(fang->x - pole->tracer->tracer->x, fang->y - pole->tracer->tracer->y) - pole->angle) > ANGLE_180)
pole->tracer->tracer->movedir = InvAngle(pole->tracer->movedir);
P_SetObjectMomZ(fang, 14*FRACUNIT, false);
fang->flags |= MF_NOGRAVITY|MF_NOCLIP;
P_SetMobjState(fang, fang->info->xdeathstate);
pole->tracer->tics = pole->tics = fang->tics;
pole->tracer->tracer->tics = pole->tracer->tics = pole->tics = fang->tics;
var1 = var2 = 0;
A_Scream(pole->tracer);
A_Scream(pole->tracer->tracer);
S_StartSound(fang, sfx_altdi1);
P_SetTarget(&pole->tracer->tracer, NULL);
P_SetMobjState(pole->tracer, pole->info->xdeathstate);
P_SetTarget(&pole->tracer, NULL);
P_SetMobjState(pole, pole->info->deathstate);
}
static void P_PlayerBarrelCollide(mobj_t *toucher, mobj_t *barrel)
@ -1092,7 +1093,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true; // overhead
if (thing->z + thing->height < tmthing->z)
return true; // underneath
if (!thing->tracer)
if (!thing->tracer || !thing->tracer->tracer)
return true;
P_SlapStick(tmthing, thing);
// no return value was used in the original prototype script at this point,