Hyudoro: toggle shadow in hovering stack so multiple shadows are not rendered

This commit is contained in:
James R. 2023-09-17 20:56:04 -07:00
parent 1cd0781648
commit 43ca8a2f4c

View file

@ -131,6 +131,13 @@ bob_in_place
(ANGLE_MAX / bob_speed), -(3*FRACUNIT/4));
}
static void
reset_shadow (mobj_t *hyu)
{
hyu->shadowcolor = 15;
hyu->whiteshadow = true;
}
static void
project_hyudoro (mobj_t *hyu)
{
@ -371,6 +378,16 @@ append_hyudoro
hyudoro_stackpos(hyu) = lastpos + 1;
P_SetTarget(head, hyu);
/* only first in list gets a shadow */
if (lastpos == 0)
{
reset_shadow(hyu);
}
else
{
hyu->shadowcolor = 31;/* black - hide it */
}
}
static void
@ -399,6 +416,8 @@ pop_hyudoro (mobj_t **head)
return;
}
reset_shadow(hyu);/* show it */
do
{
INT32 thispos = hyudoro_stackpos(hyu);