mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-28 10:42:34 +00:00
Hyudoro: stack uses modulate blendmode (with ghost trick) if player is in first place
- If player is in first place, they cannot use the stack - Use ghost trick to lessen the effect, since modulate blendmode cannot be controlled with translucency
This commit is contained in:
parent
e0d7d08dde
commit
3eeaaefc5f
1 changed files with 41 additions and 1 deletions
|
|
@ -628,6 +628,43 @@ trail_ghosts
|
|||
P_SetTarget(&ghost->tracer, hyu);
|
||||
}
|
||||
|
||||
static void
|
||||
trail_glow (mobj_t *hyu)
|
||||
{
|
||||
mobj_t *ghost = P_SpawnGhostMobj(hyu);
|
||||
|
||||
// Flickers every frame
|
||||
ghost->extravalue1 = 1;
|
||||
ghost->extravalue2 = 0;
|
||||
|
||||
ghost->renderflags = RF_ADD | RF_TRANS80;
|
||||
|
||||
ghost->tics = 2; // this actually does last one tic
|
||||
|
||||
ghost->momz = hyu->momz; // copy stack position
|
||||
}
|
||||
|
||||
static void
|
||||
blend_hover_hyudoro (mobj_t *hyu)
|
||||
{
|
||||
player_t *player = get_hyudoro_target_player(hyu);
|
||||
|
||||
hyu->renderflags &= ~(RF_BLENDMASK);
|
||||
|
||||
if (!player)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* 1st place: Hyudoro stack is unusable, so make a visual
|
||||
indication */
|
||||
if (player->position == 1)
|
||||
{
|
||||
hyu->renderflags |= RF_MODULATE;
|
||||
trail_glow(hyu);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
alt_shadow (mobj_t *hyu)
|
||||
{
|
||||
|
|
@ -727,8 +764,11 @@ Obj_HyudoroThink (mobj_t *hyu)
|
|||
if (hyudoro_target(hyu))
|
||||
{
|
||||
project_hyudoro_hover(hyu);
|
||||
hyudoro_hover_await_stack(hyu);
|
||||
|
||||
if (hyudoro_hover_await_stack(hyu))
|
||||
break;
|
||||
}
|
||||
blend_hover_hyudoro(hyu);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue