X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fpong.c;fp=hacks%2Fpong.c;h=a68872865b44e3765ca6c2bff15ef7577ae98229;hp=38e1d844f7d8bf23da936c32ce9526fdaa770c6b;hb=d1ae2829ff0fd2a96c16a0c8c5420efaa47d7b30;hpb=7edd66e6bd3209013ee059819747b10b5835635b diff --git a/hacks/pong.c b/hacks/pong.c index 38e1d844..a6887286 100644 --- a/hacks/pong.c +++ b/hacks/pong.c @@ -105,6 +105,9 @@ enum { PONG_TMARG = 10 }; +static void +p_hit_top_bottom(Paddle *p); + static void hit_top_bottom(struct state *st) { @@ -155,6 +158,10 @@ new_game(struct state *st) st->l_paddle.h = PONG_H/4; st->r_paddle.h = PONG_H/4; + /* Adjust paddle position again, because + paddle length is enlarged (reset) above. */ + p_hit_top_bottom(&st->l_paddle); + p_hit_top_bottom(&st->r_paddle); } static void