float shipdx = SCREENDXMIN, shipdy = 0.0; // Change in X position per tick.
float screendx = SCREENDXMIN, screendy = 0.0;
float xscroll, yscroll;
float shipdx = SCREENDXMIN, shipdy = 0.0; // Change in X position per tick.
float screendx = SCREENDXMIN, screendy = 0.0;
float xscroll, yscroll;
float framelen; // this controls the speed of everything that moves.
float bangx, bangy, bangdx, bangdy;
float framelen; // this controls the speed of everything that moves.
float bangx, bangy, bangdx, bangdy;
- if(screendx < SCREENDXMIN) screendx=SCREENDXMIN;
+
+ // taper off if we would hit the barrier in under 2 seconds.
+ if(back_dist + (screendx - SCREENDXMIN)*2*20*opt_gamespeed < 0) {
+ screendx = SCREENDXMIN - (back_dist/(2*20*opt_gamespeed));
+ }