mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'master' of git@git.magicalgirl.moe:KartKrew/Kart.git into rings_slopechange
This commit is contained in:
commit
316c7fe7ee
4 changed files with 39 additions and 18 deletions
|
|
@ -3558,6 +3558,8 @@ void A_BubbleCheck(mobj_t *actor)
|
||||||
//
|
//
|
||||||
void A_AttractChase(mobj_t *actor)
|
void A_AttractChase(mobj_t *actor)
|
||||||
{
|
{
|
||||||
|
fixed_t z;
|
||||||
|
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_CallAction("A_AttractChase", actor))
|
if (LUA_CallAction("A_AttractChase", actor))
|
||||||
return;
|
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));
|
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_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++;
|
actor->extravalue1++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3628,10 +3635,15 @@ void A_AttractChase(mobj_t *actor)
|
||||||
fixed_t dist = (actor->target->radius/4) * (16 - actor->extravalue1);
|
fixed_t dist = (actor->target->radius/4) * (16 - actor->extravalue1);
|
||||||
|
|
||||||
P_SetScale(actor, (actor->destscale = actor->target->scale - ((actor->target->scale/14) * 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,
|
P_TeleportMove(actor,
|
||||||
actor->target->x + FixedMul(dist, FINECOSINE(actor->angle >> ANGLETOFINESHIFT)),
|
actor->target->x + FixedMul(dist, FINECOSINE(actor->angle >> ANGLETOFINESHIFT)),
|
||||||
actor->target->y + FixedMul(dist, FINESINE(actor->angle >> ANGLETOFINESHIFT)),
|
actor->target->y + FixedMul(dist, FINESINE(actor->angle >> ANGLETOFINESHIFT)),
|
||||||
actor->target->z + (24 * actor->target->scale));
|
z);
|
||||||
|
|
||||||
actor->angle += ANG30;
|
actor->angle += ANG30;
|
||||||
actor->extravalue1++;
|
actor->extravalue1++;
|
||||||
|
|
|
||||||
14
src/p_mobj.c
14
src/p_mobj.c
|
|
@ -8356,9 +8356,17 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
|
|
||||||
K_MatchGenericExtraFlags(mobj, mobj->target);
|
K_MatchGenericExtraFlags(mobj, mobj->target);
|
||||||
P_TeleportMove(mobj, mobj->target->x + FINECOSINE(mobj->angle >> ANGLETOFINESHIFT),
|
{
|
||||||
mobj->target->y + FINESINE(mobj->angle >> ANGLETOFINESHIFT),
|
fixed_t z;
|
||||||
mobj->target->z + mobj->target->height);
|
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;
|
break;
|
||||||
case MT_THUNDERSHIELD:
|
case MT_THUNDERSHIELD:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -625,8 +625,7 @@ void P_ResetDynamicSlopes(void) {
|
||||||
slopelist = NULL;
|
slopelist = NULL;
|
||||||
slopecount = 0;
|
slopecount = 0;
|
||||||
|
|
||||||
// We'll handle copy slopes later, after all the tag lists have been made.
|
/// Generates line special-defined slopes.
|
||||||
// Yes, this means copied slopes won't affect things' spawning heights. Too bad for you.
|
|
||||||
for (i = 0; i < numlines; i++)
|
for (i = 0; i < numlines; i++)
|
||||||
{
|
{
|
||||||
switch (lines[i].special)
|
switch (lines[i].special)
|
||||||
|
|
@ -725,11 +724,21 @@ void P_ResetDynamicSlopes(void) {
|
||||||
break;
|
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
|
// Various utilities related to slopes
|
||||||
|
|
|
||||||
|
|
@ -6693,14 +6693,6 @@ void P_SpawnSpecials(INT32 fromnetsave)
|
||||||
sectors[s].midmap = lines[i].frontsector->midmap;
|
sectors[s].midmap = lines[i].frontsector->midmap;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef ESLOPE // Slope copy specials. Handled here for sanity.
|
|
||||||
case 720:
|
|
||||||
case 721:
|
|
||||||
case 722:
|
|
||||||
P_CopySectorSlope(&lines[i]);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue