--- bzmap-olympic/race_obstacles-temple.py 2005-01-05 11:07:38.470060392 +0200 +++ bzmap-olympic/race_obstacles.py 2005-01-05 13:12:28.221445112 +0200 @@ -605,6 +605,49 @@ p1 = Point( -48 , -8 , -48 ) p2 = Point( 48 , 0 , 48 ) self.tracksUnion.add( Box( p1 , p2 ) ) + +class JumpNSpin( RaceObstacle ) : + name = "JumpNSpin" + allowRotation = True + def __init__( self , context ) : + RaceObstacle.__init__( self ) + length = 64 + self.tracksUnion = RemoveSafetyTrack( x = length , z = length ) + + tubewidth = 16 + tubeheight = 10 + tubey = 10 + floorthick = context.level * 2 + wallthick = 0.5 + + p1 = Point( -tubewidth / 2 , tubey , -length / 2 ) #walls + p2 = Point( tubewidth / 2 , tubey + tubeheight , length ) + b = Box( p1 , p2 ) + p1 = Point( -tubewidth / 2 + wallthick , tubey + floorthick , -length / 2 + wallthick ) #tunnel + p2 = Point( tubewidth / 2 - wallthick , tubey + tubeheight - wallthick , length ) + b = b - Box( p1 , p2 ) + + holez = 7 + holezpos = -length / 2 + 6 + holex = 3 + context.level + p1 = Point( -holex / 2 , tubey , holezpos - holez / 2 ) + p2 = Point( holex / 2 , tubey + floorthick , holezpos + holez / 2 ) + b = b - Box( p1 , p2 ) + + #floor + floormarginal = 4 + p1 = Point( -tubewidth / 2 - floormarginal , 0 , -length / 2 - floormarginal ) + p2 = Point( tubewidth / 2 + floormarginal , -1 , -length / 2 + 12 + floormarginal ) + b = b + Box( p1 , p2 ) + + holemarginal = 1 + if context.level < 3 : #hole to help positioning + p1 = Point( -holex / 2 - holemarginal , 0 , holezpos - holez / 2 - holemarginal ) + p2 = Point( holex / 2 + holemarginal , -0.1 , holezpos + holez / 2 + holemarginal ) + b = b - Box( p1 , p2 ) + + self.union.add( b ) + class LaserBox( RaceObstacle ) : name = "LaserBox"