mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Prison CD: final visibility changes
- CD spawns instantly - 3x scale, scale down to 1x over 1 second - Do not pickup instantly - Afterimages in the air, additive - Thrown arc straight upward, less high if player is closer
This commit is contained in:
parent
65cee65b47
commit
fa6eee9a90
2 changed files with 30 additions and 20 deletions
|
|
@ -850,6 +850,12 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (special->scale > mapobjectscale)
|
||||||
|
{
|
||||||
|
// Short window so you can't pick it up instantly
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
grandprixinfo.gp == true // Bonus Round
|
grandprixinfo.gp == true // Bonus Round
|
||||||
&& netgame == false // game design + makes it easier to implement
|
&& netgame == false // game design + makes it easier to implement
|
||||||
|
|
@ -872,8 +878,12 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
|
|
||||||
if (teststate == S_PRISONEGGDROP_CD)
|
if (teststate == S_PRISONEGGDROP_CD)
|
||||||
{
|
{
|
||||||
special->momz = P_MobjFlip(special) * 2 * mapobjectscale;
|
if (P_IsObjectOnGround(special))
|
||||||
special->flags = (special->flags & ~MF_SPECIAL) | (MF_NOGRAVITY|MF_NOCLIPHEIGHT);
|
{
|
||||||
|
special->momz = P_MobjFlip(special) * 2 * mapobjectscale;
|
||||||
|
special->flags = (special->flags & ~MF_SPECIAL) | (MF_NOGRAVITY|MF_NOCLIPHEIGHT);
|
||||||
|
}
|
||||||
|
|
||||||
special->extravalue1 = 1;
|
special->extravalue1 = 1;
|
||||||
|
|
||||||
special->renderflags = (special->renderflags & ~RF_BRIGHTMASK) | (RF_ADD | RF_FULLBRIGHT);
|
special->renderflags = (special->renderflags & ~RF_BRIGHTMASK) | (RF_ADD | RF_FULLBRIGHT);
|
||||||
|
|
@ -1230,17 +1240,12 @@ static void P_AddBrokenPrison(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
|
|
||||||
if (secretpickup)
|
if (secretpickup)
|
||||||
{
|
{
|
||||||
// Grab attention with a long sound effect.
|
|
||||||
target->hitlag += 56;
|
|
||||||
S_StartSound(target, sfx_s3k85);
|
|
||||||
|
|
||||||
secretpickup->hitlag = target->hitlag;
|
secretpickup->hitlag = target->hitlag;
|
||||||
|
|
||||||
secretpickup->z -= secretpickup->height/2;
|
secretpickup->z -= secretpickup->height/2;
|
||||||
|
|
||||||
P_SetScale(secretpickup, mapobjectscale/TICRATE);
|
P_SetScale(secretpickup, 3*secretpickup->scale);
|
||||||
// secretpickup->destscale = mapobjectscale; -- safe assumption it's already set?
|
secretpickup->scalespeed = (secretpickup->scale - secretpickup->destscale) / TICRATE;
|
||||||
secretpickup->scalespeed = (2*mapobjectscale)/(3*TICRATE);
|
|
||||||
|
|
||||||
// flags are NOT from the target - just in case it's just been placed on the ceiling as a gimmick
|
// flags are NOT from the target - just in case it's just been placed on the ceiling as a gimmick
|
||||||
secretpickup->flags2 |= (source->flags2 & MF2_OBJECTFLIP);
|
secretpickup->flags2 |= (source->flags2 & MF2_OBJECTFLIP);
|
||||||
|
|
@ -1248,18 +1253,14 @@ static void P_AddBrokenPrison(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
|
|
||||||
// Okay these have to use M_Random because replays...
|
// Okay these have to use M_Random because replays...
|
||||||
// The spawning of these won't be recorded back!
|
// The spawning of these won't be recorded back!
|
||||||
const angle_t launchangle = FixedAngle(M_RandomRange(60, 80) * FRACUNIT);
|
const fixed_t dist = R_PointToDist2(target->x, target->y, source->x, source->y);
|
||||||
const fixed_t launchmomentum = 20 * mapobjectscale;
|
const fixed_t maxDist = 640 * mapobjectscale;
|
||||||
|
const fixed_t launchmomentum = Easing_Linear(
|
||||||
secretpickup->momz = P_MobjFlip(target) // THIS one uses target!
|
FixedDiv(min(dist, maxDist), maxDist),
|
||||||
* P_ReturnThrustY(secretpickup, launchangle, launchmomentum);
|
5 * mapobjectscale,
|
||||||
|
20 * mapobjectscale
|
||||||
secretpickup->angle = FixedAngle(M_RandomKey(360) * FRACUNIT);
|
|
||||||
|
|
||||||
P_InstaThrust(
|
|
||||||
secretpickup, secretpickup->angle,
|
|
||||||
P_ReturnThrustX(secretpickup, launchangle, launchmomentum)
|
|
||||||
);
|
);
|
||||||
|
secretpickup->momz = P_MobjFlip(target) * launchmomentum; // THIS one uses target!
|
||||||
|
|
||||||
mobj_t *flare = P_SpawnMobj(
|
mobj_t *flare = P_SpawnMobj(
|
||||||
target->x, target->y,
|
target->x, target->y,
|
||||||
|
|
|
||||||
|
|
@ -7539,6 +7539,12 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
||||||
else
|
else
|
||||||
mobj->angle += ANGLE_MAX/(TICRATE/3);
|
mobj->angle += ANGLE_MAX/(TICRATE/3);
|
||||||
|
|
||||||
|
if (!P_IsObjectOnGround(mobj))
|
||||||
|
{
|
||||||
|
mobj_t *gh = P_SpawnGhostMobj(mobj);
|
||||||
|
gh->renderflags |= RF_ADD;
|
||||||
|
}
|
||||||
|
|
||||||
// Non-RNG-advancing equivalent of Obj_SpawnEmeraldSparks
|
// Non-RNG-advancing equivalent of Obj_SpawnEmeraldSparks
|
||||||
if (leveltime % 3 == 0)
|
if (leveltime % 3 == 0)
|
||||||
{
|
{
|
||||||
|
|
@ -7560,6 +7566,9 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
||||||
if (mobj->target && !P_MobjWasRemoved(mobj->target))
|
if (mobj->target && !P_MobjWasRemoved(mobj->target))
|
||||||
mobj->target->color = sparkle->color;
|
mobj->target->color = sparkle->color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mobj->target && !P_MobjWasRemoved(mobj->target))
|
||||||
|
mobj->target->z = mobj->z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue