mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
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:
commit
7a48a8d72d
5 changed files with 31 additions and 18 deletions
|
@ -5345,6 +5345,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_FSGNA",
|
"S_FSGNA",
|
||||||
"S_FSGNB",
|
"S_FSGNB",
|
||||||
"S_FSGNC",
|
"S_FSGNC",
|
||||||
|
"S_FSGND",
|
||||||
|
|
||||||
// Black Eggman (Boss 7)
|
// Black Eggman (Boss 7)
|
||||||
"S_BLACKEGG_STND",
|
"S_BLACKEGG_STND",
|
||||||
|
|
|
@ -1487,6 +1487,7 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_FSGN, 0|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_FSGNA
|
{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, 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, 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)
|
// Black Eggman (Boss 7)
|
||||||
{SPR_BRAK, 0, 1, {A_SetReactionTime}, 0, 0, S_BLACKEGG_STND2}, // S_BLACKEGG_STND
|
{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, // meleestate
|
||||||
S_NULL, // missilestate
|
S_NULL, // missilestate
|
||||||
S_FSGNC, // deathstate
|
S_FSGNC, // deathstate
|
||||||
S_NULL, // xdeathstate
|
S_FSGND, // xdeathstate
|
||||||
sfx_None, // deathsound
|
sfx_None, // deathsound
|
||||||
0, // speed
|
0, // speed
|
||||||
124*FRACUNIT, // radius
|
74*FRACUNIT, // radius
|
||||||
640*FRACUNIT, // height
|
320*FRACUNIT, // height
|
||||||
0, // display offset
|
0, // display offset
|
||||||
0, // mass
|
0, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
|
|
|
@ -1657,6 +1657,7 @@ typedef enum state
|
||||||
S_FSGNA,
|
S_FSGNA,
|
||||||
S_FSGNB,
|
S_FSGNB,
|
||||||
S_FSGNC,
|
S_FSGNC,
|
||||||
|
S_FSGND,
|
||||||
|
|
||||||
// Black Eggman (Boss 7)
|
// Black Eggman (Boss 7)
|
||||||
S_BLACKEGG_STND,
|
S_BLACKEGG_STND,
|
||||||
|
|
|
@ -4070,19 +4070,28 @@ bossjustdie:
|
||||||
mobj_t *pole = P_SpawnMobj(
|
mobj_t *pole = P_SpawnMobj(
|
||||||
mo->tracer->x - P_ReturnThrustX(mo->tracer, mo->tracer->angle, speed*time),
|
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->y - P_ReturnThrustY(mo->tracer, mo->tracer->angle, speed*time),
|
||||||
mo->tracer->floorz + 4*FRACUNIT,
|
mo->tracer->floorz + (256+1)*FRACUNIT,
|
||||||
MT_FSGNB);
|
MT_FSGNB);
|
||||||
P_SetTarget(&pole->tracer, P_SpawnMobj(
|
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->x + P_ReturnThrustX(pole, mo->tracer->angle, FRACUNIT),
|
||||||
pole->y + P_ReturnThrustY(pole, mo->tracer->angle, FRACUNIT),
|
pole->y + P_ReturnThrustY(pole, mo->tracer->angle, FRACUNIT),
|
||||||
pole->z + 256*FRACUNIT,
|
pole->z + 256*FRACUNIT,
|
||||||
MT_FSGNA));
|
MT_FSGNA));
|
||||||
pole->angle = mo->tracer->angle;
|
pole->tracer->flags |= MF_NOCLIPTHING;
|
||||||
pole->tracer->angle = pole->angle - ANGLE_90;
|
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->momx = P_ReturnThrustX(pole, pole->angle, speed);
|
||||||
pole->momy = P_ReturnThrustY(pole, pole->angle, speed);
|
pole->momy = P_ReturnThrustY(pole, pole->angle, speed);
|
||||||
pole->tracer->momx = pole->momx;
|
pole->tracer->momx = pole->momx;
|
||||||
pole->tracer->momy = pole->momy;
|
pole->tracer->momy = pole->momy;
|
||||||
|
pole->tracer->tracer->momx = pole->momx;
|
||||||
|
pole->tracer->tracer->momy = pole->momy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
25
src/p_map.c
25
src/p_map.c
|
@ -664,31 +664,32 @@ static void P_SlapStick(mobj_t *fang, mobj_t *pole)
|
||||||
momx2 = fang->momx/dist;
|
momx2 = fang->momx/dist;
|
||||||
momy2 = fang->momy/dist;
|
momy2 = fang->momy/dist;
|
||||||
|
|
||||||
pole->tracer->momx = momx1 + (dist-1)*momx2;
|
pole->tracer->tracer->momx = momx1 + (dist-1)*momx2;
|
||||||
pole->tracer->momy = momy1 + (dist-1)*momy2;
|
pole->tracer->tracer->momy = momy1 + (dist-1)*momy2;
|
||||||
fang->momx = (dist-1)*momx1 + momx2;
|
fang->momx = (dist-1)*momx1 + momx2;
|
||||||
fang->momy = (dist-1)*momy1 + momy2;
|
fang->momy = (dist-1)*momy1 + momy2;
|
||||||
#undef dist
|
#undef dist
|
||||||
|
|
||||||
P_SetMobjState(pole, pole->info->deathstate);
|
P_SetObjectMomZ(pole->tracer->tracer, 6*FRACUNIT, false);
|
||||||
|
pole->tracer->tracer->flags &= ~(MF_NOGRAVITY|MF_NOCLIP);
|
||||||
P_SetObjectMomZ(pole->tracer, 6*FRACUNIT, false);
|
pole->tracer->tracer->movedir = ANGLE_67h;
|
||||||
pole->tracer->flags &= ~(MF_NOGRAVITY|MF_NOCLIP);
|
if ((R_PointToAngle(fang->x - pole->tracer->tracer->x, fang->y - pole->tracer->tracer->y) - pole->angle) > ANGLE_180)
|
||||||
pole->tracer->movedir = ANGLE_67h;
|
pole->tracer->tracer->movedir = InvAngle(pole->tracer->movedir);
|
||||||
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(fang, 14*FRACUNIT, false);
|
P_SetObjectMomZ(fang, 14*FRACUNIT, false);
|
||||||
fang->flags |= MF_NOGRAVITY|MF_NOCLIP;
|
fang->flags |= MF_NOGRAVITY|MF_NOCLIP;
|
||||||
P_SetMobjState(fang, fang->info->xdeathstate);
|
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;
|
var1 = var2 = 0;
|
||||||
A_Scream(pole->tracer);
|
A_Scream(pole->tracer->tracer);
|
||||||
S_StartSound(fang, sfx_altdi1);
|
S_StartSound(fang, sfx_altdi1);
|
||||||
|
|
||||||
|
P_SetTarget(&pole->tracer->tracer, NULL);
|
||||||
|
P_SetMobjState(pole->tracer, pole->info->xdeathstate);
|
||||||
P_SetTarget(&pole->tracer, NULL);
|
P_SetTarget(&pole->tracer, NULL);
|
||||||
|
P_SetMobjState(pole, pole->info->deathstate);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void P_PlayerBarrelCollide(mobj_t *toucher, mobj_t *barrel)
|
static void P_PlayerBarrelCollide(mobj_t *toucher, mobj_t *barrel)
|
||||||
|
@ -1092,7 +1093,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
return true; // overhead
|
return true; // overhead
|
||||||
if (thing->z + thing->height < tmthing->z)
|
if (thing->z + thing->height < tmthing->z)
|
||||||
return true; // underneath
|
return true; // underneath
|
||||||
if (!thing->tracer)
|
if (!thing->tracer || !thing->tracer->tracer)
|
||||||
return true;
|
return true;
|
||||||
P_SlapStick(tmthing, thing);
|
P_SlapStick(tmthing, thing);
|
||||||
// no return value was used in the original prototype script at this point,
|
// no return value was used in the original prototype script at this point,
|
||||||
|
|
Loading…
Reference in a new issue