Continue die animation

This commit is contained in:
Miloslav Číž 2020-02-16 10:39:06 +01:00
parent 6964339871
commit b4f7efacfa

10
main.c
View File

@ -2921,10 +2921,13 @@ void SFG_gameStep()
SFG_player.squarePosition[1]);
SFG_player.camera.height =
RCL_max(h,h + ((SFG_LOSE_ANIMATION_DURATION - t) *
RCL_CAMERA_COLL_HEIGHT_BELOW) / SFG_LOSE_ANIMATION_DURATION);
SFG_player.camera.shear =
RCL_min(SFG_CAMERA_MAX_SHEAR_PIXELS / 4,
(t * (SFG_CAMERA_MAX_SHEAR_PIXELS / 4)) / SFG_LOSE_ANIMATION_DURATION);
break;
}
@ -3517,8 +3520,9 @@ void SFG_draw()
// border indicator
if (SFG_game.frame - SFG_player.lastHurtFrame
<= SFG_HUD_BORDER_INDICATOR_DURATION_FRAMES)
if ((SFG_game.frame - SFG_player.lastHurtFrame
<= SFG_HUD_BORDER_INDICATOR_DURATION_FRAMES) ||
(SFG_game.state == SFG_GAME_STATE_LOSE))
SFG_drawIndicationBorder(SFG_HUD_BORDER_INDICATOR_WIDTH_PIXELS,
SFG_HUD_HURT_INDICATION_COLOR);
else if (SFG_game.frame - SFG_player.lastItemTakenFrame