mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 12:01:47 +00:00
Instawhip twirl
This commit is contained in:
parent
a3cc422706
commit
466f7dece0
1 changed files with 13 additions and 3 deletions
|
|
@ -11,19 +11,29 @@ void Obj_InstaWhipThink (mobj_t *whip)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
mobj_t *mo = whip->target;
|
||||||
|
player_t *player = mo->player;
|
||||||
|
|
||||||
|
// Follow player
|
||||||
whip->flags &= ~(MF_NOCLIPTHING);
|
whip->flags &= ~(MF_NOCLIPTHING);
|
||||||
P_MoveOrigin(whip, whip->target->x, whip->target->y, whip->target->z + whip->target->height/2);
|
P_SetScale(whip, whip->target->scale);
|
||||||
|
P_MoveOrigin(whip, mo->x, mo->y, mo->z + mo->height/2);
|
||||||
whip->flags |= MF_NOCLIPTHING;
|
whip->flags |= MF_NOCLIPTHING;
|
||||||
|
|
||||||
|
// Twirl
|
||||||
whip->angle = whip->target->angle + (ANG30 * 2 * whip->fuse);
|
whip->angle = whip->target->angle + (ANG30 * 2 * whip->fuse);
|
||||||
|
whip->target->player->drawangle = whip->angle;
|
||||||
|
if (player->follower)
|
||||||
|
player->follower->angle = whip->angle;
|
||||||
|
player->pflags |= PF_GAINAX;
|
||||||
|
player->glanceDir = -2;
|
||||||
|
|
||||||
|
// Visuals
|
||||||
whip->renderflags |= RF_NOSPLATBILLBOARD;
|
whip->renderflags |= RF_NOSPLATBILLBOARD;
|
||||||
|
|
||||||
if (whip->renderflags & RF_DONTDRAW)
|
if (whip->renderflags & RF_DONTDRAW)
|
||||||
whip->renderflags &= ~RF_DONTDRAW;
|
whip->renderflags &= ~RF_DONTDRAW;
|
||||||
else
|
else
|
||||||
whip->renderflags |= RF_DONTDRAW;
|
whip->renderflags |= RF_DONTDRAW;
|
||||||
|
|
||||||
P_SetScale(whip, whip->target->scale);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue