--- race-laser.py 2004-11-10 21:00:16.226146200 +0200 +++ race.py 2004-11-10 21:30:15.921550912 +0200 @@ -182,6 +182,21 @@ # # RACE OBSTACLES # +def BlockMazeObstacle( level ) : + u = Union() + t = UnionBox() + + length = 32 + 16 * level + blocks = rand( 20 ) + 10 * level + size = 3 + level * 2 + + for i in range( blocks ) : + x = rand( trackWidth + 5 ) - ( ( trackWidth + 5 ) / 2 ) + z = rand( length * 2 ) - length + p1 = Point( x , 0 , z ) + p2 = Point( x + size , 5 , z + size ) + u.add( Box( p1 , p2 ) ) + return u , t def ButtressObstacle( level ) : u = Union() @@ -1292,6 +1307,7 @@ obstacles = { #ObstacleName MaxOccurrences AllowRotation Function +'BlockMaze' : ( 4 , False , BlockMazeObstacle ) , 'Buttress' : ( 4 , True , ButtressObstacle ) , 'CatWalk' : ( 4 , True , CatWalkObstacle ) , 'ClusterBomb' : ( 0 , True , ClusterBombObstacle ) ,