1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-28 20:37:40 +00:00

rogueviz::ads:: fixed invincibility blinking, also perma-invincibility in the guided tour

This commit is contained in:
Zeno Rogue
2025-04-08 12:25:02 +02:00
parent f962d5609d
commit e3c551bf69
3 changed files with 7 additions and 4 deletions

View File

@@ -363,9 +363,9 @@ void view_ads_game() {
if(!game_over && !paused && !in_replay && !hv && !which_cross) {
poly_outline = 0xFF;
if(ship_pt < invincibility_pt) {
if(ship_pt < invincibility_pt && invincibility_pt < HUGE_VAL) {
ld u = (invincibility_pt-ship_pt) / ads_how_much_invincibility;
poly_outline = gradient(shipcolor, rsrc_color[rtHull], 0, 0.5 + cos(5*u*TAU), 1);
poly_outline = gradient(shipcolor, rsrc_color[rtHull], 1, cos(5*u*TAU), -1);
}
render_ship_parts([&] (const hpcshape& sh, color_t col, int sym) {
shiftmatrix M = shiftless(spin(ang*degree) * Id);