--- race-targetjumping.py 2004-11-15 18:35:42.000000000 +0200 +++ race.py 2004-11-20 13:57:33.106445648 +0200 @@ -1285,6 +1285,62 @@ u.add( Box( p1 , p2 ) ) return u , t +def WindowWallObstacle( level ) : + u , t = Union() , UnionBox() + + fakeholes = level + okholes = 4 - level + wallheight = 18 + rand( level * 3 ) + holemaxheight = min( wallheight , 17 ) # no un-jumpable holes + + p1 = Point( w0 - 8 , -10 , -2 ) + p2 = Point( w8 + 8 , wallheight , 2 ) + b = Box( p1 , p2 ) + + + width = 8 - level + height = 3 + + #add working holes + for i in range( okholes ) : + y = ( rand( int( holemaxheight / ( height + 1 ) - 1 ) ) + 0.5 ) * ( height + 1 ) + x = rand( trackWidth - width - 2 ) - trackWidth / 2 + 1 + + p1 = Point( x , y , -2 ) + p2 = Point( x + width , y + height , 2 ) + b = b - Box( p1 , p2 ) + + #lid + p1 = Point( x , y , -2 ) + p2 = Point( x + width , y - 0.25 , -2.25 ) + b = b + Box( p1 , p2 ) + + #fake evil lid + p1 = Point( x , y , 1.9 ) + p2 = Point( x + width , y + 0.25 , 2 ) + b = b + Box( p1 , p2 ).setFlag( 'drivethrough' ) + + #and the more evil ones + for i in range( fakeholes ) : + y = ( rand( int( holemaxheight / ( height + 1 ) - 1 ) ) + 0.5 ) * ( height + 1 ) + x = rand( trackWidth - width - 2 ) - trackWidth / 2 + 1 + p1 = Point( x , y , -2 ) + p2 = Point( x + width , y + height , 2 ) + b = b - Box( p1 , p2 ) + + #lid + p1 = Point( x , y , -2 ) + p2 = Point( x + width , y - 0.25 , -2.25 ) + b = b + Box( p1 , p2 ) + + #evil lid + p1 = Point( x , y , 1.9 ) + p2 = Point( x + width , y + 0.25 , 2 ) + b = b + Box( p1 , p2 ) + + u.add( b ) + return u , t + def CornerObstacle( level ) : u = Union() t = UnionBox() @@ -1563,7 +1619,8 @@ 'TrapDoor' : ( 4 , True , TrapDoorObstacle ) , 'Tunnel' : ( 2 , False , TunnelObstacle ) , 'Tunnel2' : ( 2 , False , Tunnel2Obstacle ) , -'Wall' : ( 4 , True , WallObstacle ) } +'Wall' : ( 4 , True , WallObstacle ) , +'WindowWall' : ( 10 , True , WindowWallObstacle ) } cornerObstacles = { 'Corner' : ( 9 , False , CornerObstacle ) ,