Merge branch 'master' of git@git.magicalgirl.moe:KartKrew/Kart.git into rings_slopechange

This commit is contained in:
Sryder 2019-07-17 20:23:30 +01:00
commit 316c7fe7ee
4 changed files with 39 additions and 18 deletions

View file

@ -3558,6 +3558,8 @@ void A_BubbleCheck(mobj_t *actor)
//
void A_AttractChase(mobj_t *actor)
{
fixed_t z;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_AttractChase", actor))
return;
@ -3601,7 +3603,12 @@ void A_AttractChase(mobj_t *actor)
{
fixed_t offz = FixedMul(80*actor->target->scale, FINESINE(FixedAngle((90 - (9 * abs(10 - actor->extravalue1))) << FRACBITS) >> ANGLETOFINESHIFT));
//P_SetScale(actor, (actor->destscale = actor->target->scale));
P_TeleportMove(actor, actor->target->x, actor->target->y, actor->target->z + actor->target->height + offz);
z = actor->target->z;
if (( actor->eflags & MFE_VERTICALFLIP ))
z -= actor->height + offz;
else
z += actor->target->height + offz;
P_TeleportMove(actor, actor->target->x, actor->target->y, z);
actor->extravalue1++;
}
}
@ -3628,10 +3635,15 @@ void A_AttractChase(mobj_t *actor)
fixed_t dist = (actor->target->radius/4) * (16 - actor->extravalue1);
P_SetScale(actor, (actor->destscale = actor->target->scale - ((actor->target->scale/14) * actor->extravalue1)));
z = actor->target->z;
if (( actor->eflags & MFE_VERTICALFLIP ))
z += actor->target->height - actor->height - 24 * actor->target->scale;
else
z += 24 * actor->target->scale;
P_TeleportMove(actor,
actor->target->x + FixedMul(dist, FINECOSINE(actor->angle >> ANGLETOFINESHIFT)),
actor->target->y + FixedMul(dist, FINESINE(actor->angle >> ANGLETOFINESHIFT)),
actor->target->z + (24 * actor->target->scale));
z);
actor->angle += ANG30;
actor->extravalue1++;

View file

@ -8356,9 +8356,17 @@ void P_MobjThinker(mobj_t *mobj)
}
K_MatchGenericExtraFlags(mobj, mobj->target);
P_TeleportMove(mobj, mobj->target->x + FINECOSINE(mobj->angle >> ANGLETOFINESHIFT),
mobj->target->y + FINESINE(mobj->angle >> ANGLETOFINESHIFT),
mobj->target->z + mobj->target->height);
{
fixed_t z;
z = mobj->target->z;
if (( mobj->eflags & MFE_VERTICALFLIP ))
z -= mobj->height;
else
z += mobj->target->height;
P_TeleportMove(mobj, mobj->target->x + FINECOSINE(mobj->angle >> ANGLETOFINESHIFT),
mobj->target->y + FINESINE(mobj->angle >> ANGLETOFINESHIFT),
z);
}
break;
case MT_THUNDERSHIELD:
{

View file

@ -625,8 +625,7 @@ void P_ResetDynamicSlopes(void) {
slopelist = NULL;
slopecount = 0;
// We'll handle copy slopes later, after all the tag lists have been made.
// Yes, this means copied slopes won't affect things' spawning heights. Too bad for you.
/// Generates line special-defined slopes.
for (i = 0; i < numlines; i++)
{
switch (lines[i].special)
@ -725,11 +724,21 @@ void P_ResetDynamicSlopes(void) {
break;
}
}
/// Copies slopes from tagged sectors via line specials.
/// \note Doesn't actually copy, but instead they share the same pointers.
for (i = 0; i < numlines; i++)
switch (lines[i].special)
{
case 720:
case 721:
case 722:
P_CopySectorSlope(&lines[i]);
default:
break;
}
}
// ============================================================================
//
// Various utilities related to slopes

View file

@ -6693,14 +6693,6 @@ void P_SpawnSpecials(INT32 fromnetsave)
sectors[s].midmap = lines[i].frontsector->midmap;
break;
#ifdef ESLOPE // Slope copy specials. Handled here for sanity.
case 720:
case 721:
case 722:
P_CopySectorSlope(&lines[i]);
break;
#endif
default:
break;
}