mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Hyudoro: flickering shadows for patrolling and stealing from a player
- Shadow flickers in high contrast colors while patrolling - Shadow flickers black/white for short time after Hyudoro steals from a player - (Resetting shadow for hovering stack already handled by append_hyudoro)
This commit is contained in:
parent
43ca8a2f4c
commit
e0d7d08dde
1 changed files with 39 additions and 0 deletions
|
|
@ -62,6 +62,7 @@ K_ChangePlayerItem
|
||||||
#define hyudoro_target(o) ((o)->target)
|
#define hyudoro_target(o) ((o)->target)
|
||||||
|
|
||||||
#define hyudoro_stolefrom(o) ((o)->hnext)
|
#define hyudoro_stolefrom(o) ((o)->hnext)
|
||||||
|
#define hyudoro_timer(o) ((o)->movedir)
|
||||||
|
|
||||||
#define hyudoro_center_max_radius(o) ((o)->threshold)
|
#define hyudoro_center_max_radius(o) ((o)->threshold)
|
||||||
#define hyudoro_center_master(o) ((o)->target)
|
#define hyudoro_center_master(o) ((o)->target)
|
||||||
|
|
@ -522,6 +523,12 @@ hyudoro_patrol_hit_player
|
||||||
|
|
||||||
hyu->renderflags &= ~(RF_DONTDRAW);
|
hyu->renderflags &= ~(RF_DONTDRAW);
|
||||||
|
|
||||||
|
// Reset shadow to default (after alt_shadow)
|
||||||
|
reset_shadow(hyu);
|
||||||
|
|
||||||
|
// This will flicker the shadow
|
||||||
|
hyudoro_timer(hyu) = 18;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -621,6 +628,31 @@ trail_ghosts
|
||||||
P_SetTarget(&ghost->tracer, hyu);
|
P_SetTarget(&ghost->tracer, hyu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
alt_shadow (mobj_t *hyu)
|
||||||
|
{
|
||||||
|
/* spaced out pulse, fake randomness */
|
||||||
|
switch (leveltime % (7 + ((leveltime / 8) % 3)))
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
hyu->shadowcolor = 15;
|
||||||
|
hyu->whiteshadow = false;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
hyu->shadowcolor = 5;
|
||||||
|
hyu->whiteshadow = true;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
hyu->shadowcolor = 181;
|
||||||
|
hyu->whiteshadow = true;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
hyu->shadowcolor = 255;
|
||||||
|
hyu->whiteshadow = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Obj_InitHyudoroCenter (mobj_t * center, mobj_t * master)
|
Obj_InitHyudoroCenter (mobj_t * center, mobj_t * master)
|
||||||
{
|
{
|
||||||
|
|
@ -680,11 +712,15 @@ Obj_HyudoroThink (mobj_t *hyu)
|
||||||
project_hyudoro(hyu);
|
project_hyudoro(hyu);
|
||||||
|
|
||||||
trail_ghosts(hyu, false);
|
trail_ghosts(hyu, false);
|
||||||
|
alt_shadow(hyu);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HYU_RETURN:
|
case HYU_RETURN:
|
||||||
move_to_player(hyu);
|
move_to_player(hyu);
|
||||||
trail_ghosts(hyu, true);
|
trail_ghosts(hyu, true);
|
||||||
|
|
||||||
|
if (hyudoro_timer(hyu) > 0)
|
||||||
|
hyu->whiteshadow = !hyu->whiteshadow;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HYU_HOVER:
|
case HYU_HOVER:
|
||||||
|
|
@ -695,6 +731,9 @@ Obj_HyudoroThink (mobj_t *hyu)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hyudoro_timer(hyu) > 0)
|
||||||
|
hyudoro_timer(hyu)--;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue