mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'sealed-vanish' into 'master'
Winning player vanishes when crossing finish line in Sealed Stars See merge request KartKrew/Kart!1677
This commit is contained in:
commit
e77a52e9fa
5 changed files with 15 additions and 0 deletions
|
|
@ -419,6 +419,7 @@ void K_HandleFollower(player_t *player)
|
||||||
K_UpdateFollowerState(player->follower, fl->idlestate, FOLLOWERSTATE_IDLE);
|
K_UpdateFollowerState(player->follower, fl->idlestate, FOLLOWERSTATE_IDLE);
|
||||||
|
|
||||||
P_SetTarget(&player->follower->target, player->mo); // we need that to know when we need to disappear
|
P_SetTarget(&player->follower->target, player->mo); // we need that to know when we need to disappear
|
||||||
|
P_SetTarget(&player->follower->punt_ref, player->mo);
|
||||||
player->follower->angle = player->follower->old_angle = player->mo->angle;
|
player->follower->angle = player->follower->old_angle = player->mo->angle;
|
||||||
|
|
||||||
// This is safe to only spawn it here, the follower is removed then respawned when switched.
|
// This is safe to only spawn it here, the follower is removed then respawned when switched.
|
||||||
|
|
@ -427,10 +428,12 @@ void K_HandleFollower(player_t *player)
|
||||||
bmobj = P_SpawnMobj(player->follower->x, player->follower->y, player->follower->z, MT_FOLLOWERBUBBLE_FRONT);
|
bmobj = P_SpawnMobj(player->follower->x, player->follower->y, player->follower->z, MT_FOLLOWERBUBBLE_FRONT);
|
||||||
P_SetTarget(&player->follower->hnext, bmobj);
|
P_SetTarget(&player->follower->hnext, bmobj);
|
||||||
P_SetTarget(&bmobj->target, player->follower); // Used to know if we have to despawn at some point.
|
P_SetTarget(&bmobj->target, player->follower); // Used to know if we have to despawn at some point.
|
||||||
|
P_SetTarget(&bmobj->punt_ref, player->mo);
|
||||||
|
|
||||||
bmobj = P_SpawnMobj(player->follower->x, player->follower->y, player->follower->z, MT_FOLLOWERBUBBLE_BACK);
|
bmobj = P_SpawnMobj(player->follower->x, player->follower->y, player->follower->z, MT_FOLLOWERBUBBLE_BACK);
|
||||||
P_SetTarget(&player->follower->hnext->hnext, bmobj); // this seems absolutely stupid, I know, but this will make updating the momentums/flags of these a bit easier.
|
P_SetTarget(&player->follower->hnext->hnext, bmobj); // this seems absolutely stupid, I know, but this will make updating the momentums/flags of these a bit easier.
|
||||||
P_SetTarget(&bmobj->target, player->follower); // Ditto
|
P_SetTarget(&bmobj->target, player->follower); // Ditto
|
||||||
|
P_SetTarget(&bmobj->punt_ref, player->mo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // follower exists, woo!
|
else // follower exists, woo!
|
||||||
|
|
|
||||||
|
|
@ -8082,6 +8082,9 @@ static void K_UpdateTripwire(player_t *player)
|
||||||
P_SetTarget(&front->target, player->mo);
|
P_SetTarget(&front->target, player->mo);
|
||||||
P_SetTarget(&back->target, player->mo);
|
P_SetTarget(&back->target, player->mo);
|
||||||
|
|
||||||
|
P_SetTarget(&front->punt_ref, player->mo);
|
||||||
|
P_SetTarget(&back->punt_ref, player->mo);
|
||||||
|
|
||||||
front->dispoffset = 1;
|
front->dispoffset = 1;
|
||||||
front->old_angle = back->old_angle = K_MomentumAngle(player->mo);
|
front->old_angle = back->old_angle = K_MomentumAngle(player->mo);
|
||||||
back->dispoffset = -1;
|
back->dispoffset = -1;
|
||||||
|
|
|
||||||
|
|
@ -276,6 +276,7 @@ static void spawn_lens_flare(mobj_t *emerald)
|
||||||
void Obj_BeginEmeraldOrbit(mobj_t *emerald, mobj_t *target, fixed_t radius, INT32 revolution_time, tic_t fuse)
|
void Obj_BeginEmeraldOrbit(mobj_t *emerald, mobj_t *target, fixed_t radius, INT32 revolution_time, tic_t fuse)
|
||||||
{
|
{
|
||||||
P_SetTarget(&emerald_orbit(emerald), target);
|
P_SetTarget(&emerald_orbit(emerald), target);
|
||||||
|
P_SetTarget(&emerald->punt_ref, target);
|
||||||
|
|
||||||
if (P_MobjWasRemoved(emerald_award(emerald)))
|
if (P_MobjWasRemoved(emerald_award(emerald)))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5434,6 +5434,9 @@ void P_RunOverlays(void)
|
||||||
mo->scale = mo->destscale = FixedMul(mo->target->scale, mo->movefactor);
|
mo->scale = mo->destscale = FixedMul(mo->target->scale, mo->movefactor);
|
||||||
mo->angle = (mo->target->player ? mo->target->player->drawangle : mo->target->angle) + mo->movedir;
|
mo->angle = (mo->target->player ? mo->target->player->drawangle : mo->target->angle) + mo->movedir;
|
||||||
|
|
||||||
|
P_SetTarget(&mo->punt_ref, mo->target->punt_ref);
|
||||||
|
mo->reappear = mo->target->reappear;
|
||||||
|
|
||||||
if (!(mo->threshold & OV_DONTSCREENOFFSET))
|
if (!(mo->threshold & OV_DONTSCREENOFFSET))
|
||||||
{
|
{
|
||||||
mo->spritexoffset = mo->target->spritexoffset;
|
mo->spritexoffset = mo->target->spritexoffset;
|
||||||
|
|
|
||||||
|
|
@ -1332,6 +1332,11 @@ void P_DoPlayerExit(player_t *player, pflags_t flags)
|
||||||
{
|
{
|
||||||
G_BeginLevelExit();
|
G_BeginLevelExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (specialstageinfo.valid == true && losing == false && P_MobjWasRemoved(player->mo) == false)
|
||||||
|
{
|
||||||
|
K_MakeObjectReappear(player->mo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
K_InitPlayerTally(player);
|
K_InitPlayerTally(player);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue